简体   繁体   English

Bot 框架包版本不匹配已破坏 Bot

[英]Bot Framework Package versions mismatch has broken Bot

Went to deploy my bot via Bot Framework Composer & got the following fail output:通过 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)

Did some Google Fu and tried to update the packages via Nuget Package Manager in Visual Studio but they kept failing.做了一些 Google Fu 并尝试通过 Visual Studio 中的 Nuget 包管理器更新包,但他们一直失败。

In the end I changed the version number in the bot.csproj file.最后我更改了 bot.csproj 文件中的版本号。

All tested in Emulator and working fine.全部在模拟器中测试并且工作正常。

Provisioned the bot & the build process ran successfully, however, my app service will no longer start successfully & I am getting 503 errors when trying to communicate with the Bot.配置机器人并成功运行构建过程,但是,我的应用程序服务将不再成功启动,并且在尝试与机器人通信时出现 503 错误。

I can not deploy my old version as I get the same error message as above.我无法部署我的旧版本,因为我收到与上面相同的错误消息。

Any help would be much appreciated.任何帮助将非常感激。

Many thanks非常感谢

Issue now solved.问题现已解决。 As per comment, targeted .net6.根据评论,针对 .net6。

CSProj file now reads: 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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM