解决VCProject输出失败
我们最近刚刚开始收到有关构建系统的警告,这最终导致构建失败。如果我在 VS2005 IDE 中构建,构建工作正常。
该错误似乎归结为以下错误:
由于错误条件,任务“ResolveVCProjectOutput”已跳过; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) 被评估为 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
我正在尝试在发布模式下构建,但似乎 ResolveVCProjectOutput 只能处理调试模式。
我正在 VS2005 中使用 msbuild 在 64 位计算机上构建 Win32。
如果相关的话,这里有更多的构建输出:
任务“删除”
正在删除文件“D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\RetargetingPlugins\Install\XSIRetargetInstallerWindows\XSIRetargetInstallerWindows.tmp_Release_Win32.vcproj”。
命令:
del“D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\RetargetingPlugins\Install\XSIRetargetInstallerWindows\XSIRetargetInstallerWindows.tmp_Release_Win32.vcproj”
完成执行任务“删除”。
已完成在项目“Slave.sln”中构建目标“XSIRetargetInstallerWindows”。
目标“MotionBuilderRetargetInstallerWindows”已跳过。之前已成功构建。
已跳过目标“MayaRetargetInstallerWindows”。之前已成功构建。
目标“MaxRetargetInstaller”已跳过。之前已成功构建。
文件“D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\Slave.sln”中的目标“RetargetingPluginsDeploymentWindows”:
由于错误条件,任务“ResolveVCProjectOutput”被跳过; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) 被评估为 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
任务“创建项目”
完成执行任务“CreateItem”。
由于错误条件,任务“ResolveVCProjectOutput”被跳过; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) 被评估为 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
任务“创建项目”
完成执行任务“CreateItem”。
由于错误条件,任务“ResolveVCProjectOutput”被跳过; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) 被评估为 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
任务“创建项目”
完成执行任务“CreateItem”。
由于错误条件,任务“ResolveVCProjectOutput”被跳过; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) 被评估为 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
任务“创建项目”
完成执行任务“CreateItem”。
由于错误条件,任务“CreateTemporaryVCProject”被跳过; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) 被评估为 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
由于错误条件,任务“VCBuild”被跳过; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) 被评估为 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
由于条件错误,任务“删除”被跳过; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) 被评估为 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
任务“ResolveVCProjectOutput”
正在解析 VC 项目引用“D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\RetargetingPlugins\Install\XSIRetargetInstallerWindows\XSIRetargetInstallerWindows.vcproj”。
D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\Slave.sln:警告 MSB3422:无法通过 VC 项目引擎对象模型检索 VC 项目信息。无法确定指定文件配置的默认工具。
D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\Slave.sln:警告 MSB3425:无法解析 VC 项目引用“D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\RetargetingPlugins\Install\XSIRetargetInstallerWindows\XSIRetargetInstallerWindows.vcproj”。
完成执行任务“ResolveVCProjectOutput”。
We just recently started getting warnings on our build system which are eventually causing the build to fail. The build works fine if I build in the VS2005 IDE.
The error seems to boil down to the following error:
Task "ResolveVCProjectOutput" skipped, due to false condition; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
I am trying to build in release mode, but it seems that the ResolveVCProjectOutput can only handle debug mode.
I am building for Win32 on a 64 bit machine in VS2005 using msbuild.
In case it's relevant, here is a bit more of the build output:
Task "Delete"
Deleting file "D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\RetargetingPlugins\Install\XSIRetargetInstallerWindows\XSIRetargetInstallerWindows.tmp_Release_Win32.vcproj".
Command:
del "D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\RetargetingPlugins\Install\XSIRetargetInstallerWindows\XSIRetargetInstallerWindows.tmp_Release_Win32.vcproj"
Done executing task "Delete".
Done building target "XSIRetargetInstallerWindows" in project "Slave.sln".
Target "MotionBuilderRetargetInstallerWindows" skipped. Previously built successfully.
Target "MayaRetargetInstallerWindows" skipped. Previously built successfully.
Target "MaxRetargetInstaller" skipped. Previously built successfully.
Target "RetargetingPluginsDeploymentWindows" in file "D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\Slave.sln":
Task "ResolveVCProjectOutput" skipped, due to false condition; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Task "CreateItem"
Done executing task "CreateItem".
Task "ResolveVCProjectOutput" skipped, due to false condition; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Task "CreateItem"
Done executing task "CreateItem".
Task "ResolveVCProjectOutput" skipped, due to false condition; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Task "CreateItem"
Done executing task "CreateItem".
Task "ResolveVCProjectOutput" skipped, due to false condition; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Task "CreateItem"
Done executing task "CreateItem".
Task "CreateTemporaryVCProject" skipped, due to false condition; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Task "VCBuild" skipped, due to false condition; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Task "Delete" skipped, due to false condition; ( ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Task "ResolveVCProjectOutput"
Resolving VC project reference "D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\RetargetingPlugins\Install\XSIRetargetInstallerWindows\XSIRetargetInstallerWindows.vcproj".
D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\Slave.sln : warning MSB3422: Failed to retrieve VC project information through the VC project engine object model. Unable to determine default tool for the specified file configuration.
D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\Slave.sln : warning MSB3425: Could not resolve VC project reference "D:\Farm\MSVC80\Builds\RetargetingPluginsDeploymentWindows\RetargetingPlugins\Install\XSIRetargetInstallerWindows\XSIRetargetInstallerWindows.vcproj".
Done executing task "ResolveVCProjectOutput".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 VS 2010 之前构建 VC++ 项目时,我遇到了一个神秘的类似问题。发生的情况是 vcbuild.exe(最终在构建 .vcproj 文件时甚至从 msbuild 中使用)解析项目文件并冻结 $(Configuration) 的值找到的第一个。包含 $(Configuration) 的任何其他字符串的计算结果将始终为第一个字符串,通常为“Debug”。对于参考,如果您正在进行干净的发布构建,“调试”文件夹中的参考项目将不存在。如果您正在进行“脏”构建,它们可能存在,并且有时看起来有效,但可能会导致过时的问题。
该解决方案非常令人讨厌,基本上归结为从控制 MSBuild 项目驱动的自定义构建任务,该项目制作了 .vcproj 文件的副本,然后剥离了未构建的配置,然后构建了临时的剥离项目而不是原始项目。要么就是这样,要么必须为每个项目保持两个单独的项目文件同步,而我们有数百个项目文件。
作为实验,重新处理一些项目文件(以及它们引用的任何文件,等等),以便首先出现“发布”配置,并查看是否会获得不同的行为。
I had a mysteriously similar problem when building VC++ projects prior to VS 2010. What happens is that vcbuild.exe (which is eventually used when building .vcproj files even from msbuild) parses the project file and freezes the value of $(Configuration) on the first one that is found. The evaluation of any other strings containing $(Configuration) will always evaluate to the first one, which is typically "Debug". For references, if you are doing a clean Release build, the referenced items in the "Debug" folders won't exist. If you are doing a "dirty" build, they may exist and this will sometimes appear to work, but can cause out-of-date issues.
The resolution was pretty nasty, basically boiling down to a custom build task driven from a controlling MSBuild project that made a copy of the .vcproj files, then stripped out the configurations not being built, then built the temporary stripped down project instead of the original. It was either that or have to keep two separate project files in sync for each project, and we had hundreds of them.
As an experiment, rework some of the project files (and any that they reference, and so on) so that the "Release" configuration appears first and see if you get different behavior.
在颠覆合并期间对项目和解决方案文件进行手动修改后,我遇到了类似的情况。解决方案文件可能非常神秘,并且手动编辑很容易出错。不管怎样,合并后,构建系统显然不喜欢与它们关联的某些项目或 GUID,因此失败了。
我为解决该问题所做的就是使用项目向导(添加新项目...)在 IDE 中从头开始重新创建冲突的项目。之后,警告就消失了。
I have run into a similar situation after I had made manual modifications to project and solution files during a subversion merge. Solution files can be really cryptic and one can easily make mistakes with manual edits. Anyway, after the merge the build system apparently didn't like some of the projects or GUIDs associated with them and failed.
What I did to solve the problem was to recreate the conflicting project from scratch in the IDE using the project wizard (Add New Project...). After that, the warnings went away.
我在运行 VS2008 时也遇到了这个问题(MSB3422 和 MSB3425),解决方案是使用 VS2008 IDE 从头开始重新创建受影响的项目。
I also had this problem (MSB3422 and MSB3425) running VS2008 and the solution was to recreate the affected projects from scratch using the VS2008 IDE.