自从我安装了visual-studio-2013 ,对源(c 或 c++)文件的任何修改都会导致我的 visual-studio-2010 完全重建项目。
如果在不修改的情况下再次构建,项目将被视为最新的并且不会再次构建。这与我在 SO 上看到的所有重建问题不同。
我已经使用 Dbgview 追踪了丢失的文件但是没有。
最佳答案
发现确实是安装visual studio 2013的问题。
首先我在visual studio中增加了冗长度
Tools -> Options -> Projects and Solutions -> Build and Run -> MSbuild project...
并观察到当我更改任何文件时的以下输出
C:\SOMEPATH\someidl.idl will be compiled as C:\PROJECTPACT\DLLDATA.C was modified at 07/13/2014 11:23:24 AM. (TaskId:18)
This request on microsoft connect表现出相同的行为。 这似乎是由于 2012 年对全局 MSbuild 引入的修复,并且仅影响具有 IDL 文件的项目。来自开发者
During the development of VS2012, we fixed several issues with tracker.exe. This tool tracks the reads and writes of the build systems. One of such improvements allowed us to properly track 64bit midl. However, this improvement also started tracking dlldata.c. In VS2012, we counteracted it by adding logic to ignore dlldata.c. This leaves VS2010 showing dlldata.c.
提供的解决方案是修改 VS2010 构建系统以使用 VS2013 构建系统的一部分。在文件 %ProgramFiles%\msbuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
线
<UsingTask TaskName="MIDL" AssemblyName="Microsoft.Build.CppTasks.Common,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
应替换为
<UsingTask TaskName="MIDL" AssemblyName="Microsoft.Build.CppTasks.Common.v110,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
关于c++ - 一个源文件更改导致在安装 Visual 2013 后在 Visual 2010 上重建完整项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25482529/