VCBuild未检测到过期文件 [英] VCBuild not detecting out-of-date files

查看:78
本文介绍了VCBuild未检测到过期文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚建立了一个基于MSBuild的新构建系统.我们使用适用于Windows和Windows Mobile的VS2005构建大多数不受管理的C ++项目.

I've just put in place a new build system based on MSBuild. We build mostly unmanaged C++ projects using VS2005 for Windows and Windows Mobile.

我的问题是,当通过命令行(调用MSBuild)完成构建时,应该重新编译的文件却没有.但是,如果我打开该* .vcproj文件,则过时的文件会重新编译.

My problem is that when a build is done via the command line (invoking MSBuild) files that should be recompiled are not. However, if I open up that *.vcproj file then the out-of-date files do get recompiled.

因此,我有一个项目,在编译时似乎可以正常构建. MSBuild退出,没有错误,等等.但是,当我运行此命令时,我得到以下输出:

So I have a project that when I compile it seems to build just fine. MSBuild exits with no errors, etc. However when I run this command I get the following output:

$ ls -lR | grep RegKey
-rwx ------ + 1 cmumford无3785 5月25日17:11 RegKey.h
-rwx ------ ++ 1 cmumford无20431 5月11日18:03 RegKey.cpp
-rwx ------ + 1 cmumford无47059 May 17 16:43 RegKey.obj
-rwx ------ + 1 cmumford无5 May 17 16:43 RegKey.sbr
-rwx ------ + 1 cmumford无83562 5月17日16:44 RegKey.obj
-rwx ------ + 1 cmumford无5 May 17 16:43 RegKey.sbr

当我执行"svn更新"时,我得到了一个新的RegKey.h,但显然RegKey.cpp并未得到应有的更新.以下是有关这些文件的更多日期/时间信息:

When I did an "svn update" I got a new RegKey.h, but it seems obvious that RegKey.cpp isn't being updated as it should. Here is a bit more date/time info on these files:

找到. -iname"RegKey *"; -exec stat {} \;
文件:`./include/RegKey.h'
大小:3785块:4 IO块:1024常规文件
设备:ccb4790h/214648720d节点:8162774325036854链接
访问权限:(0700/-rwx ------)Uid:(1003/cmumford)Gid:(513/无)
访问权限:2007-05-25 17:59:39.869250000 -0500
修改:2007-05-25 17:11:00.615375000 -0500
更改:2007-05-25 17:11:00.615375000 -0500
文件:`./src/RegKey.cpp'
大小:20431块:20 IO块:1024常规文件
设备:ccb4790h/214648720d索引节点:1407374883805132链接:1
访问:(0700/-rwx ------)Uid:(1003/cmumford) :(513/无)
访问:2007-05-25 18:01:07.150500000 -0500
修改:2007-05-11 18:03:39.815000000 -0500
更改:2007-05-11 18:03:39.815000000 -0500点击文件:`./src/WinNtD/RegKey.obj'点击面积:47059块:48 IO模块:1024常规文件搜索设备:ccb4790h/214648720d的Inode:17451448556470019个链接:1
访问:(07 00/-rwx ------)Uid:(1003/cmumford)Gid:(513/无)
访问:2007-05-17 16:43:41.304750000 -0500
修改:2007-05 -17 16:43:41.304750000 -0500
更改:2007-05-17 16:43:41.304750000 -0500
文件:`./src/WinNtD/RegKey.sbr'
大小:0块: 0 IO块:1024常规空文件
设备:ccb4790h/214648720d索引节点:7599824371597007链接:1
访问:(0700/-rwx ------)Uid:(1003/cmumford)Gid:(513 /无)
访问:2007-05-17 16:43:48.273500000 -0500
修改:2007-05-17 16:43:39.101625000 -0500
更改:2007-05-17 16:43 :48.757875000 -0500
文件:`./src/WinNtR/RegKey.obj'
大小:83562块:84 IO块:1024常规文件
设备:ccb4790h/214648720d节点:7599824371 br> Access:(0700/-rwx ------)Uid:(1003/cmumford)Gid:(513/None)
Access:2007-05-17 16:44:04.929750000 -0500
修改:2007-05-17 16:44:04.929750000 -0500
更改:2007-05-17 16:44:04.929750000 -0500
文件:`./src/WinNtR/RegKey.sbr'
大小:0块:0 IO块:1024常规空文件
设备:ccb4790h/214648720d节点:12103423998d >访问权限:(0700/-rwx ------)Uid:(1003/cmumford)Gid:(513/无)
访问权限:2007-05-17 16:44:09.804750000 -0500
修改:2007-05-17 16:43:51.226625000 -0500
更改:2007-05-17 16:44:10.289125000 -0500

但是现在当我在VS2005中打开* .vcproj文件并执行"Build All"操作时,它会重新编译一堆东西.现在我们可以看到它已经正确地重新编译了:

But now when I open up the *.vcproj file in VS2005 and do a "Build All" it recompiles a bunch of stuff. And now we can see that it was recompiled correctly:

$ ls -lR | grep RegKey
-rwx ------ + 1 cmumford无3785 5月25日17:11 RegKey.h
-rwx ------ ++ 1 cmumford无20431 5月11日18:03 RegKey.cpp
-rwx ------ + 1 cmumford无47063 5月25日18:18 RegKey.obj
-rwx ------ + 1 cmumford无5 May 25 18:18 RegKey.sbr
-rwx ------ + 1 cmumford无83563 5月25日18:17 RegKey.obj
-rwx ------ + 1 cmumford无5 May 25 18:17 RegKey.sbr

在任何地方都可以解决此问题.请帮助我-毫无疑问,我现在是我公司中最不被喜欢的人! :-(

Is there a fix for this out there anywhere. Please help me - I'm without a doubt the least liked guy at my company right now! :-(

推荐答案

我知道这个问题已有5年历史了,但是自从我解决了将近一年以来,我一直在经历类似的问题我的问题得到了帮助 此问题:http://social.msdn.microsoft.com/Forums/en/msbuild/thread/072c8832-2ecf-4739-b4e2-35cf536c7091.

I know this issue is 5 years old but I have been experiencing a similar since almost a year i have just resolved my problem helped  by this issue: http://social.msdn.microsoft.com/Forums/en/msbuild/thread/072c8832-2ecf-4739-b4e2-35cf536c7091.

我希望这对有同样情况的人有帮助.

I hope that this will help anyone with the same case.

我已经从该文件中添加了所有环境变量(来自VS2008,但我认为VS2005中另一个文件夹中的环境变量是相同的):

I have added all the environment variables from this file (from VS2008, but I think it's the same in VS2005 in another folder):

C:\ Program Files(x86)\ Microsoft Visual Studio 9.0 \ Common7 \ Tools \ vsvars32.bat

C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat

进入我的构建脚本(用Perl编写)中,现在每次都可以正常编译.

into in my build script (written in Perl) and now it compiles just fine everytime.


这篇关于VCBuild未检测到过期文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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