在TFS 2012测试版中构建失败,但解决方案在visual studio 2012 RC中成功构建



我正在尝试让构建在TFS中的构建代理上运行。我可以在Visual studio 2012 RC中成功构建解决方案,其他开发人员也可以在他们的RC中完成同样的工作。我为调试配置创建了生成定义,并在TFS服务器中对生成进行排队。我得到以下错误日志。

Error:  C:WindowsMicrosoft.NETFramework64v4.0.30319Microsoft.Common.targets (1046): The command "IF EXIST ../batch (
cd ../batch
) ELSE (
cd ../../Sources/Solution_Name/Project_Name/batch
)
createDepsFile Project_Name
" exited with code 9009.
C:WindowsMicrosoft.NETFramework64v4.0.30319Microsoft.Common.targets (1561): Could not resolve this reference. Could not locate the assembly "System.Web.Optimization". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:WindowsMicrosoft.NETFramework64v4.0.30319Microsoft.Common.targets (1561): Could not resolve this reference. Could not locate the assembly "System.Web.Providers". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Error  Global.asax.cs (16): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

我检查了添加到项目中的引用。我找不到那些程序集。在查看了所有的帖子后,我发现了一些好的建议,比如使用NuGet将这些程序集添加到解决方案中,然后在TFS中签入解决方案。缺少引用只是"警告"而不是错误。我仍然找不到我要找的Nuget中的所有程序集。一些帖子提到了该项目可能提到的内容。净4.5而不是。Net 4.0安装在构建机器中。我不想改变解决方案,直到我确切地知道问题是什么。我对这个问题一头雾水。

在这一点上,我认为这与构建定义无关。而代码9009也于事无补。我可能错了。任何建议,伙计们都需要帮助。

系统。网状物优化和系统。网状物提供者听起来像是一个ASP MVC项目。无论如何,请尝试以下操作:

  • 为这两个引用设置"Copy Local"属性为False
  • 保存更改
  • 将其设置回True并触发Build

对我来说,这很有帮助。

感谢大家的回复。我发现了问题。某些.dll的路径不正确。我刚把.dll移到MSbuild要找的地方。

听起来您缺少了对构建服务器的一些依赖关系。我不确定你必须在你的开发人员机器上安装什么才能获得系统。网状物优化和系统。网状物提供程序,但如果只是VS 2012,则可以尝试在生成代理服务器上安装VS 2012。

最新更新