1

How do I create a .exe file from a Windows Forms application?

And I want to use it on other computers without installing Visual studio, just run it as an application.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
baban jamal
  • 97
  • 1
  • 8
  • You can only move VS an executable to another computer if the 2nd computer has same version of Net library without publishing the project and installing. If the 2nd computer has Net then you can copy like Mhand7 suggested. – jdweng Oct 23 '16 at 08:33
  • Another question full of interesting answers is this one: http://stackoverflow.com/questions/18286855/how-can-i-compile-and-run-c-sharp-program-without-using-visual-studio – Steve Oct 23 '16 at 08:42

1 Answers1

1

After building the application, just go to the bin folder and you will find your .exe file.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mhand7
  • 527
  • 1
  • 3
  • 21
  • I know bro but in that case you must have installed visual studio it will not work without this – baban jamal Oct 23 '16 at 08:31
  • no you do not, unless you are using some features from framework or other libraries that comes with Visual studio, then you should install just those. you do not need to install visual studio – Mhand7 Oct 23 '16 at 08:33
  • Ok thanks I will try it now – baban jamal Oct 23 '16 at 08:50
  • Thanks I lot I installed same version of net frame work and it worked now – baban jamal Oct 23 '16 at 09:06
  • 2
    That's a wrong answer. What if you need 3d party dll etc ? You suggest to copy also dll ? OR you have no access to other PC where programm suppose to run??? To get exe file of your application you should publish it. If don't know how, ask me, I'll explain. It's not hard in VS. – Gleb B Apr 01 '18 at 19:28
  • ["Publish" implies ClickOnce](https://stackoverflow.com/questions/16946173/best-way-to-deploy-visual-studio-application-that-can-run-without-installing/16950135#16950135). – Peter Mortensen Sep 12 '19 at 13:01