简体   繁体   English

执行Postbuild Powershell脚本时出现TFS2013构建定义错误

[英]TFS2013 Build Definition Error while executing postbuild Powershell script

I'm getting an error like this, while using the script from build definition(custom SSIS template): 在使用构建定义(自定义SSIS模板)中的脚本时遇到了这样的错误:

Used the script given in this location: http://blogs.msdn.com/b/visualstudioalm/archive/2013/07/24/basic-tfbuild-scripts.aspx 使用了此位置中提供的脚本: http : //blogs.msdn.com/b/visualstudioalm/archive/2013/07/24/basic-tfbuild-scripts.aspx

This is the Error message: 这是错误消息:

**"The argument '$/path/GatherItemsForDrop.ps1' to the -File parameter does not exist. Provide the path to an existing '.ps1' file as an argument to the -File parameter." **“ -File参数的参数'$ / path / GatherItemsForDrop.ps1'不存在。提供现有'.ps1'文件的路径作为-File参数的参数。”

Exception Message: TF270015: 'GatherItemsForDrop.ps1' returned an unexpected exit code. 异常消息:TF270015:'GatherItemsForDrop.ps1'返回了意外的退出代码。 Expected '0'; 预期为“ 0”; actual '-196608'. 实际的“ -196608”。 See the build logs for more details. 有关更多详细信息,请参见构建日志。 (type UnexpectedExitCodeException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)** (类型为UnexpectedExitCodeException)异常堆栈跟踪:位于System.Activities.CodeActivity.InternalExecute(位于System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem处的System.Activities.CodeActivity.InternalExecute(ActivityInstance实例,ActivityExecutor执行程序,BookmarkManager书签管理器) .ExecuteBody(ActivityExecutor执行程序,BookmarkManager书签管理器,位置resultLocation)**

Any thoughts on this? 有什么想法吗? Thanks in Advance. 提前致谢。

** Updated - Adding Build Log with PS part** **更新-使用PS部分添加构建日志**

Perform Final Actions On Agent 00:00 对代理执行最终操作00:00

Copy binaries to drop 00:00 复制二进制文件放到00:00

Reset the Environment 00:03 重置环境00:03

Sequence 00:03 顺序00:03

Run optional script after MSBuild The argument '$/path/GatherItemsForDrop.ps1' to the -File parameter does not exist. 在MSBuild之后运行可选脚本--File参数的参数'$ / path / GatherItemsForDrop.ps1'不存在。 Provide the path to an existing '.ps1' file as an argument to the -File parameter. 提供现有“ .ps1”文件的路径作为-File参数的参数。 Exception Message: TF270015: 'GatherItemsForDrop.ps1' returned an unexpected exit code. 异常消息:TF270015:'GatherItemsForDrop.ps1'返回了意外的退出代码。 Expected '0'; 预期为“ 0”; actual '-196608'. 实际的“ -196608”。 See the build logs for more details. 有关更多详细信息,请参见构建日志。 (type UnexpectedExitCodeException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) (类型为UnexpectedExitCodeException)异常堆栈跟踪:位于System.Activities.CodeActivity.InternalExecute(位于System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem处的System.Activities.CodeActivity.InternalExecute(ActivityInstance实例,ActivityExecutor执行程序,BookmarkManager书签管理器) .ExecuteBody(ActivityExecutor执行程序,BookmarkManager书签管理器,位置resultLocation)

Note: Both the PS script as well as SSIS Solution is in the same folder in TFS. 注意:PS脚本和SSIS解决方案都位于TFS的同一文件夹中。

Only This much info available. 仅此大量信息可用。 :( .. Thanks :( .. 谢谢

The build system cant find the file. 生成系统找不到文件。 Check that it is checked in to that location and that it is in scope for the build. 检查它是否已签到该位置,并且是否在构建范围内。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM