I have searched for this and there are a number of previous answers but all seem overly complex.
I'm new to C# and Windows development in general (previous Mac developer).
I have written a simple console application in C# using Visual Studio Community edition. My application uses two third party libraries (CommandLineParser and json.NET) added to my project with NuGet from within VS.
All I want to do is build my project as a standalone .exe file that can be simply run from a command prompt without having to worry about the end user having to install lots of DLLs (something that I'm not used to dealing with as a new Windows user). I understand that the end user would need to have the .NET framework installed. Is there an idiot-proof guide to building a single .exe file in my use case?
I can't help but think that this must be a very common problem.
Thanks.
On the menu bar, choose File > New > Project to open the New Project dialog box. In the New Project dialog tree view control, select Installed > Templates > Visual C++ > MFC. In the center pane, select the MFC Application template.
The easiest way is to use the admin console. Click Applications on the left, then click Deploy . You will need to select the app from your local machine to be deployed. Most other settings can be left as default, but make sure there is a server in the target list.
Alternatively if you want to run adhoc test to see that it really works and get it done relatively fast you can try using ILMerge-GUI
I have previously struggled to use ILMerge by itself. With the GUI, it was much faster for me to verify that I can get everything working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With