Search code examples
c#portabilityportable-applications

How to create the program after finished programming it in C#


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.


Solution

  • 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.