Visual Studio 2010始终认为项目已过时,但未发生任何变化 [英] Visual Studio 2010 always thinks project is out of date, but nothing has changed

查看:139
本文介绍了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等的其他更轻松的答案

要找到丢失的文件,请使用文章

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.0\Common7\IDE\%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\中找到).对于Express版本,配置文件名为V*Express.exe.config.
  2. </configSections>行之后添加以下内容:

  1. Open the devenv.exe.config file (found in %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ or in %ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\). 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:项目'Bla \ Bla \ Dummy.vcxproj'不是最新的,因为缺少构建输入'Bla \ Bla \ SomeFile.h'.

    devenv.exe Information: 0 : Project 'Bla\Bla\Dummy.vcxproj' not up to date because build input 'Bla\Bla\SomeFile.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天全站免登陆