Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to migrate from Bot SDK 4.3 to Azure Bot Service #6789

Open
ivikashjha opened this issue May 10, 2024 · 3 comments
Open

How to migrate from Bot SDK 4.3 to Azure Bot Service #6789

ivikashjha opened this issue May 10, 2024 · 3 comments

Comments

@ivikashjha
Copy link

Hello,

We are currently trying to migrate our code from old Azure Bot Service with Bot Channel Registration and App Service to new Azure Bot Service with Azure Bot and App Service.

I have received these steps from Genie in azure support,

You can migrate from Bot SDK 4.3 to Bot SDK 4.13 by following the below steps:

Update the Bot Builder NuGet package to the latest version.
Update the Bot Framework SDK version in the .csproj file.
Update the Bot Framework SDK version in the appsettings.json file.
Update the Bot Framework SDK version in the Startup.cs file.
Update the Bot Framework SDK version in the bot.js file.
Update the Bot Framework SDK version in the web.config file.
I have completed first step updating nuget package, but i do not see SDK version in .csproj file and appsettings.json file.

@tracyboehrer
Copy link
Member

@ivikashjha You can reference the EchoBot: https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/02.echo-bot

I assume you mean the latest Bot Framework SDK version, which is 4.22.3.

4.3 is pretty far back, in which case your bot is using the old BotFrameworkHttpAdapter. The recommended action is to update to the CloudAdapter. It's not a hard change. The summary is subclass CloudAdapter instead of BotFrameworkHttpAdapter, and there are DI changes. The sample can be references for those. However, this isn't absolutely required, but in the next major version the old adapter will go away.

"Update the Bot Framework SDK version in the appsettings.json file." - There isn't an SDK version reference in the appsettings files. However, there are some new values. But for MultiTenant, it's still just MicrosoftAppId and MicrosoftAppPassword.

"Update the Bot Framework SDK version in the bot.js file." - The only reference to SDK version is the NuGet package being used.

"Update the Bot Framework SDK version in the web.config file." - This isn't a part of SDK really and doesn't exist in our samples.

But the only place you know what version of SDK being used is by the NuGet package version.

@ivikashjha
Copy link
Author

services.AddSingleton<ICredentialProvider, ConfigurationCredentialProvider>(); was used in older version,
services.AddSingleton<BotFrameworkAuthentication, ConfigurationBotFrameworkAuthentication>(); with current version template

But making these changes does not resolve the error.

@tracyboehrer
Copy link
Member

What error? Start by matching what the EchoBot sample does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants