Visual Studio 2010 总是认为项目已过时,但没有任何变化 [英] Visual Studio 2010 always thinks project is out of date, but nothing has changed

查看:23
本文介绍了Visual Studio 2010 总是认为项目已过时,但没有任何变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了与此处所述非常相似的问题.

I have a very similar problem as described here.

我还将 C++/CLI 和 C# 项目的混合解决方案从 Visual Studio 2008 升级到 Visual Studio 2010.现在在 Visual Studio 2010 中,一个 C++/CLI 项目总是过时.

I also upgraded a mixed solution of C++/CLI and C# projects from Visual Studio 2008 to Visual Studio 2010. And now in Visual Studio 2010 one C++/CLI project always runs out of date.

即使它刚刚被编译和链接并且 F5 被点击,消息框项目已经过时.你想构建它吗?"出现.这很烦人,因为 DLL 文件的层级非常低,并且强制重建解决方案的几乎所有项目.

Even if it has been compiled and linked just before and F5 is hit, the messagebox "The project is out of date. Would you like to build it?" appears. This is very annoying because the DLL file is very low-tiered and forces almost all projects of the solution to rebuild.

我的 pdb 设置设置为默认值(此问题的建议解决方案).

My pdb settings are set to the default value (suggested solution of this problem).

是否有可能获得 Visual Studio 2010 强制重建或认为项目是最新的原因?

Is it possible the get the reason why Visual Studio 2010 forces a rebuild or thinks a project is up to date?

还有什么其他想法为什么 Visual Studio 2010 会这样吗?

Any other ideas why Visual Studio 2010 behaves like that?

推荐答案

仅适用于 Visual Studio/Express 2010.查看 VS2012、VS2013 等的其他(更简单的)答案

找到丢失的文件,使用文章启用 C++ 项目系统日志 以在 Visual Studio 中启用调试日志记录并让它告诉你是什么导致了重建:

To find the missing file(s), use info from the article Enable C++ project system logging to enable debug logging in Visual Studio and let it just tell you what's causing the rebuild:

  1. 打开 devenv.exe.config 文件(位于 %ProgramFiles%Microsoft Visual Studio 10.0Common7IDE%ProgramFiles(x86)%Microsoft Visual Studio 10.0Common7IDE).对于 Express 版本,配置文件名为 V*Express.exe.config.
  2. </configSections> 行之后添加以下内容:

  1. Open the devenv.exe.config file (found in %ProgramFiles%Microsoft Visual Studio 10.0Common7IDE or in %ProgramFiles(x86)%Microsoft Visual Studio 10.0Common7IDE). For Express versions the config file is named V*Express.exe.config.
  2. Add the following after the </configSections> line:

<system.diagnostics>
  <switches>
    <add name="CPS" value="4" />
  </switches>
</system.diagnostics>

  • 重启 Visual Studio
  • 打开 DbgView 并确保它正在捕获调试输出
  • 尝试调试(在 Visual Studio 中按 F5)
  • 在调试日志中搜索任何形式的行:

  • Restart Visual Studio
  • Open up DbgView and make sure it's capturing debug output
  • Try to debug (hit F5 in Visual Studio)
  • Search the debug log for any lines of the form:

    devenv.exe 信息:0:项目BlaBlaDummy.vcxproj"不是最新的,因为缺少构建输入BlaBlaSomeFile.h".

    devenv.exe Information: 0 : Project 'BlaBlaDummy.vcxproj' not up to date because build input 'BlaBlaSomeFile.h' is missing.

    (我只是按 Ctrl+F 并搜索 not up to date)这些将是导致项目永久过时"的引用.

    (I just hit Ctrl+F and searched for not up to date) These will be the references causing the project to be perpetually "out of date".

    要更正此问题,请从项目中删除对缺失文件的任何引用,或更新引用以指示其实际位置.

    To correct this, either remove any references to the missing files from your project, or update the references to indicate their actual locations.

    注意:如果使用 2012 或更高版本,则代码段应为:

    Note: If using 2012 or later then the snippet should be:

    <system.diagnostics>
      <switches>
       <add name="CPS" value="Verbose" />
      </switches>
    </system.diagnostics>
    

    这篇关于Visual Studio 2010 总是认为项目已过时,但没有任何变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆