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

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

问题描述

我的团队正在处理使用 vsts-task-lib 的 TFS/VSTS 自定义构建任务.

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

我们按照此 github 页面 以将其包含在您的自定义任务中.

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\_tasksApprendaDeploy_fb765e50-c211-11e6-9471-0d5c99017b97.1.0ps_modulesVstsTaskSdkVstsTaskSdk.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天全站免登陆