【问题标题】:Bot Framework Package versions mismatch has broken BotBot 框架包版本不匹配已破坏 Bot
【发布时间】:2022-12-21 00:26:25
【问题描述】:

通过 Bot Framework Composer 部署我的机器人并获得以下失败输出:

    Build FAILED.

C:\Temp\15-12-22 Bot\15-12-22 Bot\CPMBot\CPMBot.csproj : warning NU1701: Package 'Microsoft.Azure.KeyVault.Core 1.0.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.
C:\Temp\15-12-22 Bot\15-12-22 Bot\CPMBot\CPMBot.csproj : error NU1605: Detected package downgrade: Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime from 4.17.1 to 4.16.0. Reference the package directly from the project to select a different version. 
C:\Temp\15-12-22 Bot\15-12-22 Bot\CPMBot\CPMBot.csproj : error NU1605:  CPMBot -> Microsoft.Bot.Components.Recognizers.CustomQuestionAnsweringRecognizer 0.0.1-preview.20221207.d820abf -> Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime (>= 4.17.1) 
C:\Temp\15-12-22 Bot\15-12-22 Bot\CPMBot\CPMBot.csproj : error NU1605:  CPMBot -> Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime (>= 4.16.0)
    1 Warning(s)
    1 Error(s)

做了一些 Google Fu 并尝试通过 Visual Studio 中的 Nuget 包管理器更新包,但他们一直失败。

最后我更改了 bot .csproj 文件中的版本号。

全部在模拟器中测试并且工作正常。

配置机器人并成功运行构建过程,但是,我的应用程序服务将不再成功启动,并且在尝试与机器人通信时出现 503 错误。

我无法部署我的旧版本,因为我收到与上面相同的错误消息。

任何帮助将非常感激。

非常感谢

【问题讨论】:

  • 您将所有 Bot.Builder 包更新到 4.17.1?您是否尝试过以 .NET 6 而不是 .NET Core 3.1 为目标?
  • 最后将所有 bot builder 包更新为 4.18.1,因为这是最新的。没有更改 .net 包 - 会尝试的,谢谢。

标签: c# nuget botframework nuget-package bot-framework-composer


【解决方案1】:

问题现已解决。根据评论,针对 .net6。

CSProj 文件现在显示为:

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
    <UserSecretsId>76555d6e-c9a5-49c0-bcda-67d0f957fc1d</UserSecretsId>
  </PropertyGroup>
  <ItemGroup>
    <Content Include="**/*.blu;**/*.dialog;**/*.lg;**/*.lu;**/*.model;**/*.onnx;**/*.qna;**/*.txt" Exclude="$(BaseOutputPath)/**;$(BaseIntermediateOutputPath)/**;wwwroot/**">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.8" />
    <PackageReference Include="Microsoft.Bot.Builder.AI.Luis" Version="4.18.1" />
    <PackageReference Include="Microsoft.Bot.Builder.AI.QnA" Version="4.18.1" />
    <PackageReference Include="Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime" Version="4.18.1" />
    <PackageReference Include="Microsoft.Bot.Components.Graph" Version="1.4.0" />
    <PackageReference Include="Microsoft.Bot.Components.HelpAndCancel" Version="1.4.0" />
  </ItemGroup>
</Project>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-01-31
    • 2020-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多