Mar 13 2020 04:18 AM
When I run the application exe file directly from C:\Program Files\WindowsApps it works, but not when I start it from the Start menu.
Process Monito is showing C:\WINDOWS\Microsoft.Net\assembly\GAC_32\Microsoft.ReportViewer.WinForms\v4.0_14.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WinForms.dll PATH NOT FOUND. NuGet package is Microsoft.ReportingServices.ReportViewerControl.Winforms. Why is he looking there when files are in an app directory? I am using .NET Framework 4.8 WPF and WindowsFormsHost for displaying the ReportViewer. From an explanation of how Package Support Framework works, I still don't know what exact steps should I take or if what process monitor shows is the root problem.
Mar 16 2020 04:03 PM - edited Mar 16 2020 04:04 PM
Can you be more specific? Where am I suppose to put this WorkingDirectory = "", in which manifest, what project, MSIX project or my exe project or config.json? I am now in VS 2019 c# project, this now has nothing to do with c++ project PsfLauncher. Process.Start("SyriliumRiF.exe"); in c# solution points probably to system32 folder because System.Environment.CurrentDirectory is returning "c:/windows/system32".
Mar 16 2020 04:05 PM
@hbatrnek Ugh! my bad. It goes in the Application section of the config.json file.
Mar 16 2020 05:09 PM
Solution
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. :)
Mar 17 2020 05:54 PM
@hbatrnek I guess I missed the part that you were programmatically starting the launcher from something else. Glad you sorted this out.