microsoft/agents/bf-to-agents-sdk-dotnet-migration
Claude Code and agent skill by microsoft/agents
- vendor
Checking that the SKILL.md file is still in the repository.
Use when migrating a Bot Framework .NET SDK bot to Microsoft 365 Agents SDK. Triggered by projects that depend on packages: Microsoft.Bot.Builder or Microsoft.Bot.Builder.Integration.AspNet.Core that want to migrate to Agents SDK.
Install
npx vskill@latest install microsoft/agents/bf-to-agents-sdk-dotnet-migrationSKILL.md
The same SKILL.md was published earlier as microsoft/agents/bf-to-agents-sdk-dotnet-migration.
Bot Framework to Agents SDK Migration (.NET)
Overview
Migrates a Bot Framework SDK bot to Microsoft 365 Agents SDK using the ActivityHandler/TeamsActivityHandler compat layer — minimal code changes, original class names preserved.
This skill stops at the compat layer. After completing this migration, ask the user whether to also convert to AgentApplication (see final step).
Agents DotNet SDK repository: https://github.com/microsoft/agents-for-net Bot Framework DotNet SDK repository: https://github.com/microsoft/botbuilder-dotnet
Core Rules
- Retain the original bot class name. Do not rename or create a new class — renaming breaks git history.
- Only change what is required for a clean migration. Do not refactor, restructure, or improve beyond what is needed to compile and run on Agents SDK.
Package Replacements
Version: Always use the latest stable (non-beta) version of Agents SDK packages by default.
| Remove (Bot Framework) | Add (Agents SDK) | |
|---|---|---|
Microsoft.Bot.Builder.Integration.AspNet.Core | Microsoft.Agents.Hosting.AspNetCore | |
Microsoft.Bot.Builder | Microsoft.Agents.Builder | |
Microsoft.Bot.Builder.Teams | Microsoft.Agents.Extensions.Teams | |
Microsoft.Bot.Builder.Dialogs | Microsoft.Agents.Builder.Dialogs | |
Microsoft.Bot.Connector | Microsoft.Agents.Connector | |
Microsoft.Bot.Connector.Authentication / MSAL auth packages | Microsoft.Agents.Authentication.Msal |
Deprecated Packages — No Agents SDK Equivalent
The following Bot Framework packages have no equivalent in the Agents SDK and are not supported. There is no recommended replacement. Remove them from the .csproj, but do not attempt to migrate the code that uses them — it will cause build errors that cannot be resolved within the Agents SDK migration. Flag this to the customer.
| Deprecated Package | |
|---|---|
Microsoft.Bot.Builder.AI.Luis | |
Microsoft.Bot.Builder.AI.Orchestrator | |
Microsoft.Bot.Builder.AI.QnA | |
Microsoft.Bot.Builder.Azure.Queues | |
Microsoft.Bot.Builder.Dialogs.Adaptive | |
Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime | |
Microsoft.Bot.Builder.Dialogs.Adaptive.Testing | |
Microsoft.Bot.Builder.Dialogs.Debugging | |
Microsoft.Bot.Builder.LanguageGeneration | |
Microsoft.Bot.Builder.TemplateManager | |
Microsoft.Bot.Configuration | |
Microsoft.Bot.Connector.Streaming | |
Microsoft.Bot.Streaming | |
Microsoft.Bot.Builder.Parsers.LU | |
AdaptiveExpressions |
Migration still proceeds — complete all other migration steps. The build errors from unmigrated code must be communicated to the customer as out-of-scope blockers.
Namespace Replacements
| Old | New | |
|---|---|---|
Microsoft.Bot.Builder | Microsoft.Agents.Builder | |
Microsoft.Bot.Builder (ActivityHandler) | Microsoft.Agents.Builder.Compat | |
Microsoft.Bot.Builder (AutoSaveStateMiddleware) | Microsoft.Agents.Builder.Compat | |
Microsoft.Bot.Builder.Teams (TeamsActivityHandler) | Microsoft.Agents.Extensions.Teams.Compat | |
Microsoft.Bot.Schema | Microsoft.Agents.Core.Models | |
Microsoft.Bot.Schema.Teams | Microsoft.Agents.Extensions.Teams.Models | |
Microsoft.Bot.Builder.Dialogs | Microsoft.Agents.Builder.Dialogs | |
Microsoft.Bot.Builder.Dialogs (PromptValidatorContext, PromptValidatorContext\<T\>) | Microsoft.Agents.Builder.Dialogs.Prompts | |
Microsoft.Bot.Builder.Integration.AspNet.Core | Microsoft.Agents.Hosting.AspNetCore | |
Microsoft.Bot.Builder.TraceExtensions | (remove) — TraceActivityAsync is built into ITurnContext |
Migration Steps
Step 1: Update packages and namespaces (see tables above)
Step 2: Keep bot class — retain original class name, only update using statements
ActivityHandler and TeamsActivityHandler exist unchanged in the Compat namespace. All override methods keep the same signatures. Do not rename the class.
For Teams:
Step 3: State management for dialog bots
If the bot overrides OnTurnAsync to call SaveChangesAsync, both patterns work — keep whichever the bot already uses:
Step 4: New Program.cs
Delete BotController.cs and AdapterWithErrorHandler.cs. Create Program.cs:
If customer had custom logic in `BotController`, preserve it using the process delegate:
Step 5 or at the very end of the migration: Ask user if they would like to write the learnings from this migration to a markdown file they could submit to use to help us improve the skill.
appsettings.json Changes
Remove Bot Framework auth config and add Agents SDK config. The shape of Connections:ServiceConnection depends on the value of MicrosoftAppType in the existing appsettings.
In all cases: remove MicrosoftAppId, MicrosoftAppPassword, MicrosoftAppType, and MicrosoftAppTenantId — their values are carried forward into the new structure.
Case 1: MicrosoftAppType = "SingleTenant"
Case 2: MicrosoftAppType = "UserAssignedMSI"
Case 3: MicrosoftAppType = "MultiTenant", missing, or null
Case 4: Any other MicrosoftAppType value
Do not generate Connections:ServiceConnection. Complete all other migration steps, then at the end inform the user:
"TheMicrosoftAppTypevalue{value}is not a standard type recognized by this migration. TheConnections:ServiceConnectionblock was not changed — additional manual configuration will be required. See: https://learn.microsoft.com/en-us/microsoft-365/agents-sdk/microsoft-authentication-library-configuration-options"
Custom BotAdapter
If the source bot subclasses BotAdapter, migrate it to ChannelAdapter (Microsoft.Agents.Builder).
Class hierarchy to choose from
| Use when | Subclass | |
|---|---|---|
| Custom transport / non-Azure channel | ChannelAdapter (abstract, minimal pipeline) | |
| Azure Bot Service connectivity with custom behavior | CloudAdapter (Microsoft.Agents.Hosting.AspNetCore) |
Most custom BotAdapter subclasses fall into the CloudAdapter case. Prefer that unless the adapter is implementing a completely custom transport.
API mapping
Bot Framework BotAdapter | Agents SDK | |
|---|---|---|
using Microsoft.Bot.Builder; | using Microsoft.Agents.Builder; | |
: BotAdapter | : ChannelAdapter or : CloudAdapter | |
Activity[] in SendActivitiesAsync | IActivity[] in SendActivitiesAsync | |
BotCallbackHandler callback delegate | AgentCallbackHandler | |
abstract UpdateActivityAsync(...) | virtual UpdateActivityAsync(...) (throws NotImplementedException if not overridden) | |
abstract DeleteActivityAsync(...) | virtual DeleteActivityAsync(...) (throws NotImplementedException if not overridden) | |
protected RunPipelineAsync(ctx, BotCallbackHandler, ct) | protected RunPipelineAsync(ctx, AgentCallbackHandler, ct) |
Registration
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 7 Aug 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagent-plugins/agents-for-net/skills/bf-to-agents-sdk-dotnet-migration/SKILL.md
Popularity
- Repository stars
- 1,024
- Repository forks
- 331
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 26 Jul 2026, 4 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/agents/bf-to-agents-sdk-dotnet-migration)