Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishing C# console application

I have developed a C# console application using VS2010. Now i would like to make it into a setup.exe. Is it possible to have this setup.exe as a standalone file to run my program? Meaning how can i achieve in obtaining setup.exe that when i click on that file it will run my console without even opening VS and without the need of my project folder on the workstation. I have tried numerous time doing myself but failed up till now. Some advice please.

Thanks, 10e5x

like image 374
10e5x Avatar asked Nov 14 '12 06:11

10e5x


2 Answers

You can publish it. Go to your solution explorer. Right click on it. publish the application. After finishing the publishing wizard, you can get the set up file in publish folder. or you can simply copy the exe file directly from the Bin folder and paste it wherever you want. Hope this is helpful.

like image 77
Freelancer Avatar answered Nov 12 '22 22:11

Freelancer


Follow the Steps

1) Firslty build the code 2) Then go to your projects folder 3) Open Debug/Bin 4) Inside Bin you can see the exe file. That file you can copy on any work station and run your console application.

Please do remember be confirm in which .NET version ur program is compiled. If suppose you compiled your program in .NET version 3.5 and running your program in .NET version 2 . It will not work

Thanks

like image 45
Sohail Avatar answered Nov 13 '22 00:11

Sohail