Reputation: 25
I want to add Active Learning to my chatbot which requires Microsoft.Bot.Builder.AI.QnA 4.3.2 and above. Currently my bot uses version 4.2.2 for any Microsoft.Bot.Builder or Microsoft.Bot.Connector packages. To update Microsoft.Bot.Builder.AI.QnA I also need to update my Microsoft.Bot.Builder and Microsoft.Bot.Connector packages to >= 4.3.2. When I update Microsoft.Bot.Connector to any version greater than 4.2.2 I am getting the following error in the VS output window when I try to run the chatbot in the Bot Framework Emulator.
Microsoft.AspNetCore.Hosting.Internal.WebHost:Critical: Application startup exception
System.MissingMethodException: Method not found: 'Void Microsoft.Bot.Connector.OAuthClient.set_EmulateOAuthCards(Boolean)'.
at Microsoft.Bot.Builder.Integration.AspNet.Core.ApplicationBuilderExtensions.UseBotFramework(IApplicationBuilder applicationBuilder)
at CBot.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in C:\Users\X\Desktop\CBot\Startup.cs:line 136
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
at Microsoft.AspNetCore.Server.IISIntegration.IISSetupFilter.<>c__DisplayClass4_0.<Configure>b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
I believe the exception is occurring when I call .UseBotFramework():
129 public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
130 {
131 _loggerFactory = loggerFactory;
132
133 app.UseDefaultFiles()
134 .UseStaticFiles()
135 .UseBotFramework();
136 }
I've seen in the Microsoft.Bot.Connector documentation that there is now an OAuthClientOld class as well as an OAuthClient class. And the OAuthClientOld class has the EmulateOAuthCards property but the OAuthClient class doesn't, so maybe this changed after Microsoft.Bot.Connector 4.2.2. I'm not sure how I can fix this however given that I don't directly call OAuthClient. Does anyone have a fix for this?
Upvotes: 1
Views: 354
Reputation: 1347
Make sure all your Bot packages are upgraded to 4.3.2.
Any/all of the below:
Microsoft.Bot.Builder.Dialogs {4.3.2}
Microsoft.Bot.Connector {4.3.2}
Microsoft.Bot.Schema {4.3.2}
Microsoft.Bot.Configuration {4.3.2}
Microsoft.Bot.Builder {4.3.2}
Microsoft.Bot.Builder.Integration.AspNet.Core {4.3.2}
Microsoft.Bot.Builder.Ai.QnA {4.3.2}
Upvotes: 2