【问题标题】:Build Fails with NU1101: Unable to find package Microsoft.Bot.Protocol.StreamingExtensions.NetCore使用 NU1101 构建失败:找不到包 Microsoft.Bot.Protocol.StreamingExtensions.NetCore
【发布时间】:2019-08-07 18:43:42
【问题描述】:

我正在尝试使用 Azure DevOps 和 BotFramework 设置 DevOps 管道。我的构建由于包Microsoft.Bot.Protocol.StreamingExtensions.NetCore 而失败,错误为NU1101: Unable to find package Microsoft.Bot.Protocol.StreamingExtensions.NetCore. No packages exist with this id in source(s): NuGetOrg

我尝试卸载此软件包,但随后我开始在本地收到相同的错误。当我尝试重新安装时,我在 NuGet 上找不到包,这可能就是发生此错误的原因,因此我不得不恢复到以前的提交以获得我的机器人的工作版本。

在 Azure DevOps 上构建项目时,应该能够安装包。对此的任何帮助表示赞赏。

【问题讨论】:

    标签: azure-devops botframework


    【解决方案1】:

    使用 NU1101 构建失败:找不到包 Microsoft.Bot.Protocol.StreamingExtensions.NetCore

    那是因为Microsoft.Bot.Protocol.StreamingExtensions.NetCore 只发布到myget.org 而不是nuget.org。这也是错误消息显示 this id in source(s): NuGetOrg 的原因。

    你可以在myget.org找到那个包:

    https://botbuilder.myget.org/gallery/experimental
    

    然后获取连接feed的URL是:

    https://botbuilder.myget.org/F/experimental/api/v3/index.json
    

    要在 Azure DevOps 上解决此问题,您可以在解决方案文件夹下添加 nuget.config,内容如下:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <packageSources>
        <add key="MyGetFeed" value="https://botbuilder.myget.org/F/experimental/api/v3/index.json" />
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />   
      </packageSources>     
    </configuration>
    

    然后将此文件提交并推送到 Azure Devops 存储库。还原 nuget 包时使用此文件:

    作为测试,它在我这边运行良好。

    希望这会有所帮助。

    【讨论】:

    • 请注意 - 对于 azure devops 的新手来说,设置 NuGet.config 的路径只是一项任务,应该在 azure-pipelines.yml 中的 steps 键下进行它看起来像这样:steps: - task: NuGetToolInstaller@0 - task: NuGetCommand@2 inputs: command: 'restore' restoreSolution: '**/*.sln' feedsToUse: 'config' nugetConfigPath: './NuGet.Config'
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-28
    • 2020-11-10
    • 2015-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多