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"
]
}
]
}
}
}
]
}
]
}
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 14, 2020Copper Contributor
I am not missing anything, I've dumped everything you've got into the folder.
Sysinternals DebugView did not catch anything but in Event Viewer there is a record of an error.
I've also tried running it in safe mode.
"Faulting application name: PsfLauncher32.exe, version: 0.0.0.0, time stamp: 0x5e66e34c
Faulting module name: PsfRuntime32.dll, version: 0.0.0.0, time stamp: 0x5e66e338
Exception code: 0xc0000409
Fault offset: 0x00028bd1
Faulting process id: 0x5dc8
Faulting application start time: 0x01d5fa3f846ea6ca
Faulting application path: C:\Programming\SyriliumRiF\Main\SyriliumRiF.MSIX\bin\x86\Release\PsfLauncher32.exe
Faulting module path: C:\Programming\SyriliumRiF\Main\SyriliumRiF.MSIX\bin\x86\Release\PsfRuntime32.dll
Report Id: 1f39b072-5917-486f-abc1-21712ebdc372"
- Tim ManganMar 14, 2020MVP
hbatrnek Perhaps you are missing PsfRuntime32.dll? I see you have the exe but we always use the dll.
Also: PsfLauncher, even the release build, will always output to the debug port. So run Sysinternals DebugView on the side to see what it might be telling you.
- hbatrnekMar 14, 2020Copper Contributor
Sysinternals DebugView did not catch anything but in Event Viewer there is a record of an error:
"Faulting application name: PsfLauncher32.exe, version: 0.0.0.0, time stamp: 0x5e66e34c
Faulting module name: PsfRuntime32.dll, version: 0.0.0.0, time stamp: 0x5e66e338
Exception code: 0xc0000409
Fault offset: 0x00028bd1
Faulting process id: 0x5dc8
Faulting application start time: 0x01d5fa3f846ea6ca
Faulting application path: C:\Programming\SyriliumRiF\Main\SyriliumRiF.MSIX\bin\x86\Release\PsfLauncher32.exe
Faulting module path: C:\Programming\SyriliumRiF\Main\SyriliumRiF.MSIX\bin\x86\Release\PsfRuntime32.dll
Report Id: 1f39b072-5917-486f-abc1-21712ebdc372
Faulting package full name:
Faulting package-relative application ID: "
- 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"
- hbatrnekMar 14, 2020Copper Contributor
I've tried that and when I go to Publish > Create App Package on the Windows Application Package Project, he just overrides whatever I've entered in Application > Executable with the executable from the referenced project.
Package.appxmanifest:
<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>SyriliumRiF.MSIX_1.0.80.0_x86.appx oppened with MSIX Packaging Tool:
<Applications> <Application Id="App" Executable="SyriliumRiF.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>I don't know how to stop him from overriding what I've entered.
The solution that comes to mind is creating another executable project that I can reference and that starts the PsfLauncher32.exe, I'll try that.