So I've finished programming my project in C# and now I want to make it into a program that can run without Visual Studio. How do I do that?

I want the executable and all that so I can put my program on a flash drive and give to my friend.

有帮助吗?

解决方案 2

You set the configuration to Debug or Release, then click Build -> Build {name} Solution or Build -> Build {name} project. Under the source folder there will be a bin\Debug and bin\Release folder with your executable in. Visual Studio will build it as you are running it in the IDE anyway so this step isn't strictly necessary but best to make sure its the latest build.

Your friend needs to have the .net framework installed to be able to run your app. This needs to match the version that you built your app with. He can browse to http://smallestdotnet.com to check what version he has installed.

其他提示

There are a view possibilities here.

  1. Copy the content of the bin\debug or the bin\release folder in your project folder.
  2. Publish the application as an offline one-click application (this one will install it.)
  3. Create an installer project manually
  4. Use WIX to create an installer project
  5. Create your own installer application.

Developpers deployment strategies => http://msdn.microsoft.com/en-us/library/ee942965.aspx

what i usualy do is go to file and press "Save as" then copy the file location and paste it somewhere else. Then go to your bin>debug and it should be there.

Ususaly you can find it in your Bin folder under Debug or Release.

You have to build it, under Build menu. Then the executable will be located in your project's bin folder either in Debug or Release folders.

Click On Build-> Build Solution, It will build solution , go in bin/debug folder in your project folder and find executable. Also you can build one click installer, Click on build-> publish 'project name' . Complete wizard , it will create installer and install it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top