【问题标题】:Build not working in Release managment while succeeded in TFS with disable release trigger在禁用发布触发器的 TFS 中成功构建时,构建在发布管理中不起作用
【发布时间】:2016-07-01 09:34:21
【问题描述】:

我正在尝试使用发布管理部署代码但遇到异常:

异常消息:发布构建失败(异常类型) 异常堆栈跟踪:在 System.Activities.Statements.Throw.Execute(CodeActivityContext 上下文) 在 System.Activities.CodeActivity.InternalExecute(ActivityInstance 实例,ActivityExecutor 执行器,BookmarkManager 书签管理器) 在 System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor 执行器, BookmarkManager bookmarkManager, Location resultLocation)

我编辑了构建定义并禁用了发布触发器。然后构建在不触发发布的情况下成功,但是如果我从 RM 客户端使用刚刚创建的最新构建开始手动发布,则会失败并显示错误消息:

【问题讨论】:

  • 看日志。退出代码 4 来自 xcopy。 Initialization error occurred. There is not enough memory or disk space, or you entered an invalid drive name or invalid syntax on the command line.

标签: tfsbuild ms-release-management


【解决方案1】:

请参考此问题进行故障排除:What is going wrong when Visual Studio tells me "xcopy exited with code 4"

Xcopy exit code 4 表示“初始化出错。没有 足够的内存或磁盘空间,或者您输入了无效的驱动器名称或 命令行上的语法无效。”

看起来 Visual Studio 正在向 xcopy 提供无效参数。 通过 Project Properties > Right 检查您的构建后事件命令 单击 > 构建事件 > 发布构建事件。

请注意,如果 $(ProjectDir) 或类似的宏术语在 扩展时生成的路径,那么它们将需要被包装 双引号。

当目标文件夹为只读时也会出现此错误,请在部署的服务器中检查。

【讨论】:

    最近更新 更多