TFS | VSTS-自定义生成任务执行找不到VstsTaskSdk.psd1 [英] TFS | VSTS - Custom Build Task execution cannot find VstsTaskSdk.psd1

查看:82
本文介绍了TFS | VSTS-自定义生成任务执行找不到VstsTaskSdk.psd1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队正在处理TFS/VSTS定制构建任务,该任务利用了 vsts-task-lib .

My team is working on a TFS/VSTS custom build task that utilizes the vsts-task-lib.

我们遵循了

We followed the instructions on this github page to include it with your custom task.

我在本地安装了vsts-task-lib以进行交互式测试,并且执行正常.我可以将扩展程序上传并安装到我的VSTS帐户/项目中.

I have the vsts-task-lib installed locally for interactive testing, and that is executing ok. I am able to get the extension uploaded and installed into my VSTS account/project.

但是,当我排列所有内容并在VSTS上执行Release时,我得到以下信息:

However, when I line everything up and execute a Release on VSTS, I get the following:

2016-12-22T21:41:27.4700501Z ##[section]Starting: ApprendaDeploy 

2016-12-22T21:41:27.5110766Z ==============================================================================

2016-12-22T21:41:27.5120761Z Task         : Deploy App on Apprenda

2016-12-22T21:41:27.5120761Z Description  : This task deploys your application onto ACP

2016-12-22T21:41:27.5120761Z Version      : 0.1.0

2016-12-22T21:41:27.5120761Z Author       : Apprenda

2016-12-22T21:41:27.5120761Z Help         : Replace with markdown to show in help

2016-12-22T21:41:27.5120761Z ==============================================================================

2016-12-22T21:41:27.8483971Z ##[error]File not found: 'C:\a\_tasks\ApprendaDeploy_fb765e50-c211-11e6-9471-0d5c99017b97\0.1.0\ps_modules\VstsTaskSdk\VstsTaskSdk.psd1'

2016-12-22T21:41:27.8553964Z ##[section]Finishing: ApprendaDeploy 

我正在使用vsts-task-lib v0.8.0,我的任务根文件目录如下:

I'm using vsts-task-lib v0.8.0 and my task root file directory looks like this:

|-- apprendaDeploy <task root>
  |----- ps_modules
     |----- VstsTaskSDK
        |----- 0.8.0
            |------ <corresponding sdk files, including VstsTaskSdk.psd1>
  |----- common.ps1
  |----- deploy.ps1
  |----- icon.png
  |----- task.json

有什么想法吗?

推荐答案

您需要将SDK文件移动到...\VstsTaskSdk\*,而不是将它们放在特定于版本的文件夹中.我遇到了同样的问题,并以这种方式解决了.

You need to move the SDK files to ...\VstsTaskSdk\* rather than them being in a version specific folder. I ran into the same issue and resolved it this way.

这篇关于TFS | VSTS-自定义生成任务执行找不到VstsTaskSdk.psd1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆