每次运行项目 VS2010 都认为项目已过时。我浏览了这篇文章并通过 debugView 启用了调试输出。debugView 中的相关行如下:
00000001 0.00000000 [7792] devenv.exe Information: 0 :
00000002 0.00001620 [7792] Project 'C:\code\MyProject\MyProject.vcxproj' not up to date because 'C:\PROGRAMDATA\SOPHOS\SOPHOS ANTI-VIRUS\CONFIG\CONFIG.BOPS' was modified at 09/24/2012 12:50:28, which is newer than 'C:\CODE\MyProject\DEBUG\MyProject.BSC' which was modified at 09/24/2012 16:07:24.
00000003 23.05826569 [7792] devenv.exe Information: 0 :
00000004 23.05829620 [7792] Project 'C:\code\MyProject\MyProject.vcxproj' not up to date because 'C:\PROGRAMDATA\SOPHOS\SOPHOS ANTI-VIRUS\CONFIG\CONFIG.BOPS' was modified at 09/24/2012 12:50:28, which is newer than 'C:\CODE\MyProject\DEBUG\MyProject.BSC' which was modified at 09/24/2012 16:07:24.
00000005 26.08067894 [7792] devenv.exe Information: 0 :
00000006 26.08071709 [7792] Project 'C:\code\MyProject\MyProject.vcxproj' not up to date because 'C:\PROGRAMDATA\SOPHOS\SOPHOS ANTI-VIRUS\CONFIG\CONFIG.BOPS' was modified at 09/24/2012 12:50:28, which is newer than 'C:\CODE\MyProject\DEBUG\MyProject.BSC' which was modified at 09/24/2012 16:07:24.
首先,VS2010 会查看一些不相关的文件(嗯,微软!),这很糟糕,但我尝试了这个解决方案,这两者都<ClNoDependencies>
用来排除不相关的文件,但我没有运气。
我注意到,如果我从一个简单的全新项目开始,它就没有这个烦人的project is out of date
问题。这似乎是 VS2010 中的一个已知错误,但对我来说,为什么 VS2010 将我的原始项目链接到那个不相关的防病毒文件而不是新项目?这是否意味着我可以在我的原始项目中修复一些东西来取消链接文件?但我不知道会是什么,因为我的项目根本没有引用该防病毒文件。
这个问题有什么解决办法吗?