【问题标题】:Error when building VS2008 solution with TFS2010使用 TFS2010 构建 VS2008 解决方案时出错
【发布时间】:2011-05-18 11:28:09
【问题描述】:

使用 TFS2010 构建 VS2008 解决方案时出现以下错误。

error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\AssemblyInfoTask\Microsoft.VersionNumber.Targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

有人可以帮我吗?

谢谢。

【问题讨论】:

    标签: visual-studio-2008 visual-studio-2010 msbuild


    【解决方案1】:

    看起来 MSBuild 找不到 AssemblyInfoTask\Microsoft.VersionNumber.Targets,一个可能的问题是构建服务没有对​​自定义任务进行递归搜索以下载它们。看看你的问题是不是和这个类似:

    http://social.msdn.microsoft.com/forums/en-US/tfsbuild/thread/dfefb86a-a969-4545-9f0d-7e764fd49861

    Aaron Hallberg 在此处描述了如何配置构建服务以递归方式搜索自定义任务:

    http://blogs.msdn.com/b/aaronhallberg/archive/2008/02/12/modifying-the-configurationfolderpath-recursiontype-in-team-build-2008.aspx

    祝你好运!

    【讨论】:

    • Aaron 提供的解决方案对我不起作用。提到的附加键()已经包含在 TfsBuildService.exe.config 文件中。还有其他想法吗?
    • 我终于解决了这个问题。新的构建服务器上缺少 AssemblyInfoTask 文件夹。所以我只是从旧的复制它。现在对我来说很好用
    • 是的,如果您将 AssemblyInfoTask 文件夹签入到 TfsBuild.proj 的配置路径下的版本控制中,它应该被拾取到您创建的任何构建机器。
    猜你喜欢
    • 2012-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-15
    • 1970-01-01
    • 2012-02-18
    • 1970-01-01
    相关资源
    最近更新 更多