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. 🙂
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.
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: "