© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
57 replies
Jānis

Publish to single working .exe

Hi, almost complete beginner with c#, and I'm not sure, what I need to do, to solve it.

Previously I made a very small app with target framework, I think, 4.8.
I simply built the solution, took the .exe file from the solution and could distribute it to others, it simply worked. [1]

Current project is .net 7.0.
When building it, it builds also multiple files [2].
However, I can't simply take the .exe.
It doesn't work without the other four files.

I tried costura, multiple different .csproj options, but none of them work, if I only want to take the .exe and run it from another computer.
The app is very very simple, like ~ 350 loc... I managed to bring it up to 150 MB with embeded dependencies I assume, it still didn't work.
What I should look into, to make it work as single .exe if I want to run it myself?

Another issue I encountered, even if I give all of the files to another person, he didn't have 7.0 runtime, is there some kind of version that should be available by default on windows, or I need to check this with IT?

Best regards!
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

Publish single-file
C#CC# / help
2y ago
✅ .EXE works in release but not publish?
C#CC# / help
3y ago
Build single executable
C#CC# / help
16mo ago