✅ .EXE works in release but not publish?
Hi, I have a WPF application, and I have made some stuff with the notification area (system tray), I tried yesterday to do it with <UseWinForms>true<UseWinForms>, and everything worked perfectly when building with release. but when I build with publish, it doesn't work. And I know its because of the WinForms thing, since if i removed it, it launched fine.
Then I found a nuget package today, which can do the system tray things, but now, again, it doesn't wanna run in publish, but it again runs just fine in release. I use the following settings in my PublishProfile:
This is my csproj:
Is there some way I can debug it to figure out why it doesn't work, it is really pissing me off that it doesn't work when I publish it... but for some reason works when I build it for release
1 Reply
Turning off PublishSingleFile fixes it, but why...? 😦
I need it as a single file
I fixed it with
IncludeAllContentForSelfExtract
set to true, after finding the remark of it maybe fixing combatability problems https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview?tabs=cli