TFS | VSTS - Custom build execution cannot find VstsTaskSdk.psd1

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

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

I have vsts-task-lib installed locally for interactive testing, and this works fine. I can get the extension downloaded and installed in my account / VSTS project.

However, when I build everything and execute 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 

I am using vsts-task-lib v0.8.0, and the root file of my task is as follows:

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

Any ideas?

+6
source share
1 answer

You need to move the SDK files to ...\VstsTaskSdk\* , and not to the version- ...\VstsTaskSdk\* folder. I ran into the same problem and solved it that way.

+11
source

Source: https://habr.com/ru/post/1013442/


All Articles