简体   繁体   English

VS2010无法正确重建

[英]VS2010 Not Rebuilding Properly

Visual Studio is not seeming to rebuild changed included files in my project properly. Visual Studio似乎无法正确重建项目中包含的更改文件。 I tried removing the requirement that the file match; 我尝试删除文件匹配的要求; though that displays the source code when stepping, it still runs the old code (it would execute commented lines, etc). 尽管在步进时会显示源代码,但它仍运行旧代码(它将执行带注释的行等)。 I could not seem to find any relevant settings wrong. 我似乎找不到任何相关的设置错误。 It is set to "Always Build" when project files are out of date. 当项目文件过期时,它设置为“ Always Build”。

This is for c++ if relevant 如果适用,这适用于c ++

Any help would be appreciated. 任何帮助,将不胜感激。 Thanks! 谢谢!

You need to check "Build" in Build -> Configuration-Manager as well. 您还需要在Build-> Configuration-Manager中选中“ Build”。

视觉工作室

配置管理器

尝试“构建...清理”菜单选项,然后尝试“构建...重建解决方案”菜单选项。

The only thing that solved this problem for me was to go to Tools-->Options-->Project and Solution-->Build and Run, and set "On Run, when projects are out of date" to "Always build". 对我来说,唯一解决此问题的方法是转到“工具”->“选项”->“项目和解决方案”->“构建并运行”,然后将“项目过期时运行时”设置为“始终构建”。 And that only worked once. 那只能用一次。 I'm still trying to determine what the permanent solution is. 我仍在尝试确定永久解决方案是什么。 I've tried deleting everything in the Bin and Obj folders and still the old code manages to be used when I start debugging. 我尝试删除Bin和Obj文件夹中的所有内容,但在开始调试时仍然可以使用旧代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM