Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Recently I finished up a couple programs in Visual Studio (2015). I put these programs on a flash drive with the goal of being able to show them off on other computers.

Do I need to keep a copy of Visual Studio on the flash drive in case the computer I'm running it on doesn't have it? And if not how do I get my program to run without the compiler?

No....You need to build the .exe. That is all and include any dlls. Right click next to 'debug' on toolbar and select 'release.' Then click 'start.' This will build a release for you program. Will only work on machines with .net installed though. J.S.Orris Feb 4, 2017 at 0:03
  • In solution Explorer right click on your project and click "Build" (point 1. in the screenshot)
  • Once the build is complete right click again on your project and click "Open Folder in File Explorer" (point 2. in the screenshot)
  • Visual studio will open a Windows Explorer window with a lot of files and folders. Open the "bin" folder
  • Inside the bin folder you will find a folder called "Debug" or a folder called "Release" depending on the build configuration you chose. Inside the "Debug" (or "Release") folder you will find all the resources required to run your application (usually a .exe file, a .config file and some DLL files)
  • You can copy the content of this folder to your flash drive and your program will run on any computer that has the correct version of the .net framework installed
  • Here is a Visual Studio 2015 screenshot that shows where to find the commands you need:

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .