For a long time I have had a WPF application running in .NetFramework 4.8 and finally took the step to port it to .NET6 to get the LTS that follows.
However I now face an issue with publishing. I have a Network Drive folder that I publish (ClickOnce) my app to. Through this folder users will be able to install the application, the application is also set to watch the location for new versions. Ever since I ported the project to .NET 6 it will no longer launch the application properly from the installed application (debugging works fine though).
What happens is when a user launches it it will open up the following window, same as usual:
However once this has finished it just goes back to nothing most of the times, I have however found that if try to open the application multiple times in a quick succession, sometimes it will launch the application perhaps 1/5, though small sample size so not certain how often it will launch.
This issue only applies to using the application reference (the Launcher.exe) when I run the application.exe it runs just fine, even from the install location. but doing this simply doesn't work for me since it will mean that the user cannot update the application then.
I have checked the Windows Logs > Application in the Event Viewer and nothing shows up like an error there.
I have tried Disabling and whitelisting the launcher.exe in the Firewall, this did nothing.
I tried to create a simple barebones WPF application in .NET 6 and .NetFramework 4.8, publish and test how they work, just as a simple comparison (to rule out application errors) and the same issue that I saw with my own application persists.
I have tried a multitude of different settings for the publish profile with the same result.
I am at my wits end here, my best guess I can come up with right now is that the .NET way of publishing changes the behavior of the application (Launcher.exe is a new addition for instance), perhaps it is the loss of the setting "This is a full trust application", but I cannot say for sure. I'm hoping someone here can tell me what to do to make .NET6 publishing work, else ill just have to port back to .NetFramework 4.8