首页 > 解决方案 > 使用 NU1101 构建失败:找不到包 Microsoft.Bot.Protocol.StreamingExtensions.NetCore

问题描述

我正在尝试使用 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-devopsbotframework

解决方案


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

那是因为Microsoft.Bot.Protocol.StreamingExtensions.NetCore只发布到myget.orgNotnuget.org。这也是错误消息显示源中的此 id: 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 包时使用此文件:

在此处输入图像描述

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

希望这可以帮助。


推荐阅读