Forum Discussion
MSIX application is not opening ReportViewer Microsoft.ReportViewer.WinForms
- Mar 16, 2020
I've resolved it with this:
Process.Start(Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "PsfLauncher32.exe"));The problem was in the root path when starting it from windows start, root path for Process.Start is not the application folder when started as a store package. 🙂
I've tried this https://docs.microsoft.com/en-us/windows/msix/psf/package-support-framework, application runs but the issue stays, it will not open window with the report viewer on it and it does not throw an exception.
Maybe the issue is in config.json, I am not sure how to configure it.
Package.appxmanifest:
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity
Name="a1ddc6e0-bb40-49b3-8e57-6a0646b7f49d"
Publisher="CN=TRUE IT, O=TRUE IT, C=HR"
Version="1.0.72.0" />
<Properties>
<DisplayName>SyriliumRiF</DisplayName>
<PublisherDisplayName>TRUE IT</PublisherDisplayName>
<Logo>Images\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="PSFLauncher32.exe"
EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements
DisplayName="SyriliumRiF"
Description="SyriliumRiF"
Square150x150Logo="Images\Square150x150Logo.png"
Square44x44Logo="Images\Square44x44Logo.png" BackgroundColor="white">
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" Square71x71Logo="Images\SmallTile.png" Square310x310Logo="Images\LargeTile.png" >
</uap:DefaultTile >
<uap:SplashScreen Image="Images\SplashScreen.png" />
<uap:LockScreen BadgeLogo="Images\BadgeLogo.png" Notification="badgeAndTileText"/>
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>
config.json:
{
"applications": [
{
"id": "App",
"executable": "SyriliumRiF.exe",
"workingDirectory": "/"
}
],
"processes": [
{
"executable": "SyriliumRiF",
"fixups": [
{
"dll": "FileRedirectionFixup32.dll",
"config": {
"redirectedPaths": {
"packageRelative": [
{
"base": "/",
"patterns": [
".*\\.dll"
]
}
]
}
}
}
]
}
]
}
- Mar 13, 2020
hbatrnek For a dll not found issue, assuming the dll is in your package you should probably try adding DynamicLibraryFixup.
This fixup was developed to ensure the exe will find any dll inside the package, overcoming issues due to working directory, path variables not being supported, and AppPaths not being supported.
It may be included in addition to the FileRedirectionFixup.
- hbatrnekMar 14, 2020Copper Contributor
This is my exe project that starts PsfLauncher32:
class Program { static void Main(string[] args) { Process.Start("PsfLauncher32.exe"); } }and this is the config.json:
{ "applications": [ { "id": "App", "executable": "SyriliumRiF.exe", "workingDirectory": "/" } ], "processes": [ { "executable": "SyriliumRiF", "fixups": [ { "dll": "FileRedirectionFixup32.dll", "config": { "redirectedPaths": { "packageRelative": [ { "base": "/", "patterns": [ "*" ] } ] } } }, { "dll": "TraceFixup32.dll", "config": { "traceLevels": { "filesystem": "allFailures" } } }, { "dll": "DynamicLibraryFixup32.dll", "config": { "traceLevels": { "filesystem": "allFailures" } } } ] } ] }Why is PsfLauncher32 not starting SyriliumRiF.exe?
Who is reading the config.json, is PsfLauncher32 reading it?
What parameters do I need to send to PsfLauncher32.exe, what would be the command line call?
- Tim ManganMar 14, 2020MVP
hbatrnek wrote:
Who is reading the config.json, is PsfLauncher32 reading it?
hbatrnek In the PsfLauncherXX.exe process, PsfRuntimeXX.dll will initially read the config.json file for the "applications" section at the top of the file. It is this runtime that will process the instructions for the matching application ID (based on process name munging mentioned previously).
When the PsfRuntime launches your target process, it injects another copy of PsfRuntime into that process. This secondary copy will re-read the config.json file for the purpose of handling the bottom half ("processes") to determine which other dlls to inject and provide those injected dlls with their configuration.
- hbatrnekMar 13, 2020Copper Contributor
I am sideloading my package, not through the store and I have an MSIX project with Package.appxmanifest file. The problem is no matter what I enter in this part (you can see the zulzu.exe file which does not exist):
<Applications> <Application Id="App" Executable="zulzu.exe" EntryPoint="$targetentrypoint$"> <uap:VisualElements DisplayName="SyriliumRiF" Description="SyriliumRiF" Square150x150Logo="Images\Square150x150Logo.png" Square44x44Logo="Images\Square44x44Logo.png" BackgroundColor="white"> <uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" Square71x71Logo="Images\SmallTile.png" Square310x310Logo="Images\LargeTile.png" > </uap:DefaultTile > <uap:SplashScreen Image="Images\SplashScreen.png" /> <uap:LockScreen BadgeLogo="Images\BadgeLogo.png" Notification="badgeAndTileText"/> </uap:VisualElements> </Application> </Applications>the real exe starts normally, that is saying that PSFLauncher32.exe was never started when in Executable, but if I am to delete this whole Applications section the package complains so, this manifest file is being used but that Application part is ignored, why?
- Tim ManganMar 13, 2020MVP
hbatrnek It should be like this for MSIX:
EntryPoint="Windows.FullTrustApplication"