5

I have developed a console application in C#. I need to create an EXE file now. By copy and pasting that EXE file to another machines, it should work with the actual process what which i done in my machine. I have searched for it and mostly there was solutions for Win apps. I need to do it in my console app.

Steps i have done yet: 1. Created a console app. 2. Right clicked on Solution which is placed in solution explorer -> Add -> New project -> Other Project Types -> Visual Studio Installer -> Given name and chooses the location and Clicked "OK". 3. File System wizard been showing now.

From here I need your advice to add the assembly.

demonplus
  • 5,613
  • 12
  • 49
  • 68
Venil
  • 83
  • 2
  • 4
  • 9
  • 1
    Are you trying to create an installer. If not, just an exe may not work specially when you use external library or reference another project. In this case you need exe of your console application and referenced dlls to run the project properly. – Hossain Muctadir Sep 16 '13 at 06:19
  • http://stackoverflow.com/questions/939438/ways-to-deploying-console-applications-in-c-sharp, http://stackoverflow.com/questions/13374017/publishing-c-sharp-console-application, http://stackoverflow.com/questions/3767/what-is-the-best-choice-for-building-windows-installers – acarlon Sep 16 '13 at 06:20

2 Answers2

9

There are 2 Ways to Do This... I just did this 20 Min Ago :)

  • Method 1 : Right Click on Your Project, Publish, Choose Location For The installer, Run it
  • Method 2 : As Previous people mentioned your bin/release folder will contain .exe files which need to be copied and Installed, i prefer the 1st method

Just a Side Note. Make Sure the Output Type Is of Console Type (Right Click on project... Output type...), Some windows applications give Problems when Publishing and Installing them

Desmond Smith
  • 1,197
  • 1
  • 9
  • 13
0

If your application doesn't require writing to registry, startup, etc. And just merely copy pasting the exe, you might just need a batch script for that.

Ruel
  • 15,438
  • 7
  • 38
  • 49