【问题标题】:Getting The BuildTasks.IncrementBuildNumber" task could not be loaded from the assembly error while building from TFS从 TFS 构建时,无法从程序集错误中加载 BuildTasks.IncrementBuildNumber" 任务
【发布时间】:2012-01-23 11:45:09
【问题描述】:

项目在 visualstudio2010 中运行良好,但如果我尝试使用 TFS 构建运行构建,则会出现以下错误。

Z:\TFSBuilds\1\box\IT\Sources\IT\it.vbproj (2113): The "BuildTasks.IncrementBuildNumber" task could not be loaded from the assembly Z:\TFSBuilds\1\box\IT\Sources\IT\WinAssemblyInfo.dll. Could not load file or assembly 'file:///Z:\TFSBuilds\1\box\IT\Sources\IT\WinAssemblyInfo.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

虽然其他项目正在建设中。知道缺少什么,我做错了什么。

【问题讨论】:

    标签: .net visual-studio-2010 msbuild tfsbuild


    【解决方案1】:

    以下答案假定您的模块 WinAssemblyInfo.dll 已在源代码管理中签入:

    一个干净的方法是检查构建日志。
    为此,使用设置@Parameters“Logging Verbosity”=“Diagnostic”对新构建进行排队。

    一旦再次失败,打开日志并导航到Get Workspace部分。搜索您缺少的程序集 WinAssemblyInfo.dll 是否已下载到工作区 - 以及它的所有依赖项。一个相当常见的缺陷是,您没有将包含模块 ($/.../WinAssemblyInfo.dll) 的源代码管理目录插入到 Build Definition 中选项卡“Workspace”的工作文件夹列表中。

    另一个选项,仍然假设 WinAssemblyInfo.dll 在源代码管理中签入:

    此程序集是否对其他源模块强制执行任何操作?如果是这样,这可能是一个缺少权利的问题。执行 TFS-Build 的默认用户是 Network-Service,该用户的权限可能比您自己少。
    在我的每个 TeamProjects 中,为了这个确切的目的,我已将 Build-Server 添加为项目管理员。

    这可以通过右键单击 TeamProject,然后单击“TeamProject 设置”>“组”来实现成员资格...',然后 dbl 单击“[]\Project Administrators”,然后“添加”一个“Windows 用户或组”:
    单击“对象类型..”并选择“计算机”。
    当您现在输入服务器名称时,它应该会出现。

    【讨论】:

    • 非常感谢。修复了问题。在我的情况下,dll 没有添加到源代码管理中......
    猜你喜欢
    • 1970-01-01
    • 2012-07-30
    • 2014-03-01
    • 2018-10-19
    • 1970-01-01
    • 1970-01-01
    • 2015-02-26
    • 2017-12-09
    • 2016-01-13
    相关资源
    最近更新 更多