C
C#10mo ago
Mustafa

Publishing Windows Forms App to a single .exe with no extra dependencies/dlls (Visual Studio)

I've been trying to publish my Windows Forms App .NET application to a single .exe and have tried multiple solutions to no avail. Trying to publish with the setup wizard didn't work because I'm not getting the same UI as the 50 tutorials that show how to do so. My publish wizard looks like the 1st image attached to this post rather than the ones with options to choose Folder like the tutorials show. I've tried to run dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true, but I'm met with the errors: C:\Program Files\dotnet\sdk\8.0.201\Microsoft.Common.CurrentVersion.targets(3386,5): error MSB4216: Could not run the "GenerateResource" task because MSBuild could not create or connect to a task host with runtime "NET" and architecture "x86". C:\Program Files\dotnet\sdk\8.0.201\Microsoft.Common.CurrentVersion.targets(3410,7): error MSB4028: The "GenerateResource" task's outputs could not be retrieved from the "FilesWritten" parameter. Object does not match target type. Does anybody have advice on what I should try doing?
No description
5 Replies
cypherpotato
cypherpotato10mo ago
is it .net framework or .net core? also plz share your .csproj file contents
Mustafa
MustafaOP10mo ago
.NET Framework
No description
Mustafa
MustafaOP10mo ago
and let me get csproj
Mustafa
MustafaOP10mo ago
Mustafa
MustafaOP10mo ago
@cypherpotato ^
Want results from more Discord servers?
Add your server