You can see : .NET Framework deployment guide for developers
Build a stand-alone executable by Visual Studio 2019 Community
I have Visual Studio 2019 Community. I try to create a stand-alone executable out of a .NET Console project. Yet, the .exe I get needs several DLLs from the VS environment. I want to run the EXE on a computer in which VS is not installed., How do I create a true self contained EXE?
3 answers
Sort by: Oldest
-
-
abbodi86 3,866 Reputation points
2020-11-29T19:40:17.417+00:00 If you mean external or 3rd party reference assemblies, you can merge them
https://github.com/dotnet/ILMerge
https://github.com/gluck/il-repack -
Timon Yang-MSFT 9,576 Reputation points
2020-12-01T09:56:36.76+00:00 Are you using .net framework or .net core?
If it is .net core, please try the following steps:
- Right-click on the project and select Publish.
- Choose the location you want to deploy, as an example, I choose the folder, and then next->finish.
- Click Edit, set Deployment Mode to Self-contained, expand File publish options, and select Produce single file.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.