Continuous integration VSTS开发人员工具生成任务错误:根据开放式打包约定规范中定义的规则,部件URI无效

Continuous integration VSTS开发人员工具生成任务错误:根据开放式打包约定规范中定义的规则,部件URI无效,continuous-integration,azure-devops,tfsbuild,azure-pipelines,Continuous Integration,Azure Devops,Tfsbuild,Azure Pipelines,我在执行VSTS开发人员工具构建任务时遇到以下错误,我已包含扩展清单,请帮助我解决此问题 错误:请求失败:错误的Request400-部件URI根据无效 开放式包装惯例规范中定义的规则。tfx 失败,错误为:错误:C:\agent\u work\u tools\tfx.cmd失败,错误为 返回代码:4294967295- 关于VSTS开发人员工具构建任务,清单文件是JSON文件而不是XML文件,您也可以使用VSIX文件 JSON文件如下所示: { "manifestVersion": 1

我在执行VSTS开发人员工具构建任务时遇到以下错误,我已包含扩展清单,请帮助我解决此问题

错误:请求失败:错误的Request400-部件URI根据无效 开放式包装惯例规范中定义的规则。tfx 失败,错误为:错误:C:\agent\u work\u tools\tfx.cmd失败,错误为 返回代码:4294967295-


关于VSTS开发人员工具构建任务,清单文件是JSON文件而不是XML文件,您也可以使用VSIX文件

JSON文件如下所示:

{
    "manifestVersion": 1,
    "id": "sample-extension",
    "version": "0.1.0",
    "name": "My first sample extension",
    "description": "A sample Visual Studio Services extension.",
    "publisher": "fabrikamdev",
    "targets": [
        {
            "id": "Microsoft.VisualStudio.Services"
            }
        ],
    "icons": {
        "default": "images/logo.png"
     },
    "contributions": [
        {
            "id": "Fabrikam.HelloWorld",
            "type": "ms.vss-web.hub",
            "description": "Adds a 'Hello' hub to the Work hub group.",
            "targets": [
                "ms.vss-work-web.work-hub-group"
                ],
            "properties": {
                "name": "Hello",
                "order": 99,
                "uri": "hello-world.html"
            }
        }
    ],
    "scopes": [
        "vso.work"
    ],
    "files": [
        {
            "path": "hello-world.html", "addressable": true
        },
        {
            "path": "scripts", "addressable": true
        },
        {
            "path": "sdk/scripts", "addressable": true
        },
        {
            "path": "images/logo.png", "addressable": true
        }
    ]
}
有关更多信息,请参阅本文:

我的步骤:

确保选择所有可访问的帐户并添加服务端点 编辑/创建生成定义 添加npm安装生成步骤/任务工作文件夹:$build.sources目录;npm命令:安装;参数:vss web扩展sdk 添加发布扩展步骤/任务检查扩展清单文件选项;根清单文件夹:$Build.SourcesDirectory;清单文件:vss-extension.json注意:我的扩展文件位于源目录$Build.SourcesDirectory中,例如vss-extension.json等…
啊,很抱歉,我之前对扩展的类型感到困惑,因为您的问题上有所有vs团队服务和vsts标签。目前还没有发布到旧Visual Studio库的任务。尽管我希望新市场很快会得到支持。目前,您仍然需要通过清单文件发布JSON文件。我更新了我的答案,你可以检查一下。
{
    "manifestVersion": 1,
    "id": "sample-extension",
    "version": "0.1.0",
    "name": "My first sample extension",
    "description": "A sample Visual Studio Services extension.",
    "publisher": "fabrikamdev",
    "targets": [
        {
            "id": "Microsoft.VisualStudio.Services"
            }
        ],
    "icons": {
        "default": "images/logo.png"
     },
    "contributions": [
        {
            "id": "Fabrikam.HelloWorld",
            "type": "ms.vss-web.hub",
            "description": "Adds a 'Hello' hub to the Work hub group.",
            "targets": [
                "ms.vss-work-web.work-hub-group"
                ],
            "properties": {
                "name": "Hello",
                "order": 99,
                "uri": "hello-world.html"
            }
        }
    ],
    "scopes": [
        "vso.work"
    ],
    "files": [
        {
            "path": "hello-world.html", "addressable": true
        },
        {
            "path": "scripts", "addressable": true
        },
        {
            "path": "sdk/scripts", "addressable": true
        },
        {
            "path": "images/logo.png", "addressable": true
        }
    ]
}