Skip to content

Deprecate Controllers#2704

Merged
rido-min merged 3 commits into
mainfrom
fix/rm-controllers
Jan 27, 2026
Merged

Deprecate Controllers#2704
rido-min merged 3 commits into
mainfrom
fix/rm-controllers

Conversation

@rido-min

Copy link
Copy Markdown
Contributor

This pull request updates the Teams SDK C# documentation to focus exclusively on the minimal API approach, removing all references, code samples, and explanations related to the legacy controller-based pattern. The changes streamline the docs, making them clearer and more consistent for new users by presenting a single recommended way to build Teams apps with C#.

Key changes include:

Removal of Controller-based Examples and Tabs

  • All controller/attribute-based code samples and associated <Tabs> UI have been removed from the following documentation files, leaving only minimal API examples using app.OnMessage, teams.OnMessage, etc. (teams.md/src/components/include/essentials/api/csharp.incl.md, teams.md/src/components/include/essentials/graph/csharp.incl.md, teams.md/src/components/include/essentials/on-activity/csharp.incl.md, teams.md/src/components/include/essentials/sending-messages/csharp.incl.md, teams.md/src/components/include/essentials/sending-messages/proactive-messaging/csharp.incl.md, teams.md/src/components/include/getting-started/code-basics/csharp.incl.md, teams.md/src/components/include/in-depth-guides/adaptive-cards/building-adaptive-cards/csharp.incl.md, teams.md/src/components/include/in-depth-guides/ai/mcp/mcp-client/csharp.incl.md) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Updates to Getting Started and Code Basics

  • The getting started guide and code basics now exclusively show minimal API setup and message handling using teams.OnMessage, removing all mention of controller classes and attributes. Project structure and code samples have been updated accordingly. [1] [2] [3]

Improvements to Adaptive Card Action Handling

  • Adaptive card action handling is refactored to use the minimal API pattern (teams.OnAdaptiveCardAction) instead of controller attributes. The handler logic is also updated for clarity and additional action handling, with improved logging and response construction. [1] [2]

General Documentation Clean-up

  • Explanations and comments have been updated to refer to the minimal API approach, and parameter names have been adjusted for consistency (e.g., context.activity instead of activity). [1] [2]

Migration and Dependency Updates

  • Removed unnecessary service registrations related to controllers in migration guides and updated dependency usage in code samples to match the minimal API pattern. [1] [2]

These changes ensure the documentation is modern, easier to follow, and aligned with the current best practices for building Teams apps in C#.

@rido-min

Copy link
Copy Markdown
Contributor Author

related to microsoft/teams.net#281

@rido-min
rido-min marked this pull request as ready for review January 26, 2026 20:55
@rido-min
rido-min merged commit 90d37d1 into main Jan 27, 2026
2 checks passed
@rido-min
rido-min deleted the fix/rm-controllers branch January 27, 2026 03:17
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

Successfully merging this pull request may close these issues.

2 participants