[英]Visual Studio Express 2012 not building exe in Release folder
I have compiled a simple 'Hello World' program. 我编写了一个简单的“Hello World”程序。 The program is successfully compiled without any errors. 程序编译成功,没有任何错误。 I can see a working executable in bin folder. 我可以在bin文件夹中看到工作的可执行文件。 But the Release folder of the project is totally empty. 但该项目的Release文件夹完全是空的。
I don't know if there is any settings problem or any problem in building. 我不知道是否有任何设置问题或建设中的任何问题。 Apparently, I don't see any error. 显然,我没有看到任何错误。
You can change your build mode in top of your Visual Studio: 您可以在Visual Studio的顶部更改构建模式:
Dependently on which mode you build your solution, Visual Studio will generate .exe in either bin\\Debug
folder or bin\\Release
folder. 根据您构建解决方案的模式,Visual Studio将在bin\\Debug
文件夹或bin\\Release
文件夹中生成.exe。
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. 默认情况下,VS将构建一个Debug构建,它将进入bin\\Debug
文件夹。
For details, see How to: Set Debug and Release Configurations . 有关详细信息,请参见如何:设置调试和发布配置 。
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] \\ bin \\ Debug for Debug build mode或[your_project_directory] \\ bin \\ Release for Release build mode
To switch between default directories Debug/Release use solution proposed here . 要在默认目录之间切换 Debug / Release使用此处提出的解决方案。
But if you want specify your own output directory , follow these steps: 但是,如果要指定自己的输出目录 ,请按照下列步骤操作:
Screenshot from properties window: 属性窗口截图:
This solution can be useful at least in two cases: 此解决方案至少在两种情况下非常有用:
I hope that this description will be helpful. 我希望这个描述会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.