自定义扩展找不到 VstsTaskSdk.psd1
Custom Extension can't find VstsTaskSdk.psd1
我正在尝试使用 Powershell 为 Azure DevOps 的 Build/Release 任务构建我的扩展。当我上传并安装我的扩展程序时,我不断收到以下错误:
##[error]File not found: 'E:\ADOAgents\Agent1\_work\_tasks\MDDSVisualStudioBuild_c2ba1f80-29d5-11e7-b903-6faaecee54d3.0.2\ps_modules\VstsTaskSdk\VstsTaskSdk.psd1'
我使用了以下有关如何从 Whosebug tutorial. I have also used the following 构建我的任务的说明,以确保我没有收到此错误,但我一直无法解决它。
这是我的任务的文件结构:
package-lock.json
README.cmd
vss-extension.json
MDDSVisualStudioBuild
-task.json
-icon.png
-task.loc.json
-VSBuild.ps1
-ps_modules
-VstsTaskSdk
-* (all the files)
这就是我构建扩展程序的方式:
1. use node 10.16
2. npm install
3. npm init -y
4. npm install -g azure-pipelines-task-lib --save
5. npm i -g tfx-cli
6. tfx extension create --manifest-globs vss-extension.json --rev-version
7. Copy *vsix Files to: $(Build.ArtifactStagingDirectory)
8. Publish vsix Artifact: package
我真的不明白我在这里做错了什么...
我明白了。我的 vss-extension.json 中的版本与我的 task.json.
中的版本不匹配
:( 这花了我很长时间
我正在尝试使用 Powershell 为 Azure DevOps 的 Build/Release 任务构建我的扩展。当我上传并安装我的扩展程序时,我不断收到以下错误:
##[error]File not found: 'E:\ADOAgents\Agent1\_work\_tasks\MDDSVisualStudioBuild_c2ba1f80-29d5-11e7-b903-6faaecee54d3.0.2\ps_modules\VstsTaskSdk\VstsTaskSdk.psd1'
我使用了以下有关如何从 Whosebug tutorial. I have also used the following
这是我的任务的文件结构:
package-lock.json
README.cmd
vss-extension.json
MDDSVisualStudioBuild
-task.json
-icon.png
-task.loc.json
-VSBuild.ps1
-ps_modules
-VstsTaskSdk
-* (all the files)
这就是我构建扩展程序的方式:
1. use node 10.16
2. npm install
3. npm init -y
4. npm install -g azure-pipelines-task-lib --save
5. npm i -g tfx-cli
6. tfx extension create --manifest-globs vss-extension.json --rev-version
7. Copy *vsix Files to: $(Build.ArtifactStagingDirectory)
8. Publish vsix Artifact: package
我真的不明白我在这里做错了什么...
我明白了。我的 vss-extension.json 中的版本与我的 task.json.
中的版本不匹配:( 这花了我很长时间