Visual Studio Express 2012 not building exe in Release folder

后端 未结 3 920
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 02:13

I have compiled a simple \'Hello World\' program. The program is successfully compiled without any errors. I can see a working executable in bin folder. But the Release folder o

相关标签:
3条回答
  • 2021-02-19 02:40

    You can change your build mode in top of your Visual Studio:

    enter image description here

    Dependently on which mode you build your solution, Visual Studio will generate .exe in either bin\Debug folder or bin\Release folder.

    0 讨论(0)
  • 2021-02-19 02:50

    More expanded explanation:

    Your output directory of executable file is specified by default to [your_project_directory]\bin\Debug for Debug build mode or to [your_project_directory]\bin\Release for Release build mode

    • your_project_directory - place where is created your project (there is located *.csproj file)

    To switch between default directories Debug/Release use solution proposed here.

    But if you want specify your own output directory, follow these steps:

    1. Go to Project -> [MyProjectName] Properties... (or type Alt+F7) and in properties window switch to Build tab (from left panel)
    2. From Configuration combobox select proper build mode (in your case Release) or select: "All Configurations" - the same options for both build modes
    3. At the end in output path textbox choose folder where you want store executable file (and other created during buil of application)

    Screenshot from properties window:

    Properties

    This solution can be useful at least in two cases:

    1. When are you learning and you want not waste space on your disc, then you can specyfy outbut file for all your project to one tmp directory and clean it in some period of time from not necessary files
    2. When your start work with real "huge project" that include many e.g. .csproj projects your can create Runtime directory to storage all your executable files and files created during build of application

    I hope that this description will be helpful.

    0 讨论(0)
  • 2021-02-19 02:55

    Make sure you're building the release version, not the debug version. By default, VS will build a Debug build, which will go into the bin\Debug folders.

    For details, see How to: Set Debug and Release Configurations.

    0 讨论(0)
提交回复
热议问题