Skip to content

feat: deprecate DevTools (Libraries 2.0) in favor of Microsoft 365 Agents Playground#522

Open
corinagum wants to merge 3 commits into
mainfrom
cg/devtools-deprecation
Open

feat: deprecate DevTools (Libraries 2.0) in favor of Microsoft 365 Agents Playground#522
corinagum wants to merge 3 commits into
mainfrom
cg/devtools-deprecation

Conversation

@corinagum
Copy link
Copy Markdown
Collaborator

Summary

  • [Obsolete] on DevToolsPlugin and AddTeamsDevTools() in Microsoft.Teams.Plugins.AspNetCore.DevTools. Consumers see CS0618 on their .AddTeamsDevTools() calls with a clear migration message.
  • Add anonymous-mode startup warning in AddTeamsTokenAuthentication when settings.ClientId is empty. Customers running with no credentials get an explicit signal that their bot accepts unauthenticated requests on /api/messages.
  • Remove AddTeamsDevTools() and the DevTools ProjectReference from all 16 samples. The samples now demonstrate the SDK without DevTools; users should run Microsoft 365 Agents Playground for local testing.
  • PackageReleaseNotes and [DEPRECATED]-prefixed PackageDescription on the DevTools csproj so the deprecation metadata surfaces in NuGet package browsers.
  • README banner on the DevTools package pointing at Microsoft 365 Agents Playground.

Why

DevTools is being replaced by Microsoft 365 Agents Playground. The replacement is a standalone CLI tool; customers install it separately and run it alongside their bot. For the grace period, DevToolsPlugin keeps working but loudly signals its deprecation through [Obsolete], package metadata, and the README.

The deprecation message wording matches the equivalent change in teams.ts and teams.py and stays version-agnostic per team convention ("a later version", not a specific version number).

Compile-time notes

  • The DevTools library's own internal DevToolsController references DevToolsPlugin (by design). To avoid breaking its build under TreatWarningsAsErrors=true, the DevTools csproj adds CS0618 to its NoWarn list. Consumer code outside the library still sees the warning.
  • Three samples (Samples.AI, Samples.Cards, Samples.Dialogs) were pulling Microsoft.Teams.Plugins.AspNetCore in transitively through DevTools. Each gets an explicit ProjectReference so they keep building.
  • The project-wide CS0618 suppression in Samples/Directory.Build.props is removed now that no sample calls AddTeamsDevTools().

Test plan

  • dotnet build Microsoft.Teams.sln (0 errors, 1 pre-existing warning on Samples.Tab unrelated to this change)
  • Confirmed DevToolsPlugin and AddTeamsDevTools() emit CS0618 to external consumers when used
  • Anonymous-mode warning text matches the equivalent warning in the other SDKs
  • Reviewer to spot-check one or two samples compile and run cleanly without DevTools

Registry deprecation

The corresponding nuget.org deprecation flag should be set on Microsoft.Teams.Plugins.AspNetCore.DevTools after this ships, so consumers running dotnet add package see a deprecation banner. Tracked separately by the publishing engineer.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 22, 2026 20:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR deprecates the Microsoft.Teams.Plugins.AspNetCore.DevTools package in favor of Microsoft 365 Agents Playground, updates NuGet/package/README metadata accordingly, and removes DevTools usage from samples to keep them aligned with the supported local testing workflow.

Changes:

  • Mark DevToolsPlugin and AddTeamsDevTools() as [Obsolete], and add NuGet package metadata + README banner indicating deprecation.
  • Add a startup warning when token authentication is effectively bypassed due to missing Teams ClientId configuration.
  • Remove DevTools project references and .AddTeamsDevTools() calls across samples (and add explicit Microsoft.Teams.Plugins.AspNetCore references where previously transitive).

Reviewed changes

Copilot reviewed 37 out of 38 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Samples/Samples.Threading/Samples.Threading.csproj Removes DevTools project reference from sample.
Samples/Samples.Threading/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.TargetedMessages/Samples.TargetedMessages.csproj Removes DevTools project reference from sample.
Samples/Samples.TargetedMessages/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.Tab/Samples.Tab.csproj Removes DevTools project reference from sample.
Samples/Samples.Tab/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.Reactions/Samples.Reactions.csproj Removes DevTools project reference from sample.
Samples/Samples.Reactions/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.Quoting/Samples.Quoting.csproj Removes DevTools project reference from sample.
Samples/Samples.Quoting/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.MessageExtensions/Samples.MessageExtensions.csproj Removes DevTools project reference from sample.
Samples/Samples.MessageExtensions/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.McpClient/Samples.McpClient.csproj Removes DevTools project reference from sample.
Samples/Samples.McpClient/Program.cs Removes .AddTeamsDevTools() usage (keeps OpenAI wiring).
Samples/Samples.Mcp/Samples.Mcp.csproj Removes DevTools project reference from sample.
Samples/Samples.Mcp/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.Lights/Samples.Lights.csproj Removes DevTools project reference from sample.
Samples/Samples.Lights/Program.cs Removes .AddTeamsDevTools() usage (keeps OpenAI wiring).
Samples/Samples.Graph/Samples.Graph.csproj Removes DevTools project reference from sample.
Samples/Samples.Graph/Program.cs Removes .AddTeamsDevTools() usage (keeps OAuth setup).
Samples/Samples.Echo/Samples.Echo.csproj Removes DevTools project reference from sample.
Samples/Samples.Echo/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.Dialogs/Samples.Dialogs.csproj Replaces DevTools transitive reference with explicit AspNetCore plugin reference.
Samples/Samples.Dialogs/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.Cards/Samples.Cards.csproj Replaces DevTools transitive reference with explicit AspNetCore plugin reference.
Samples/Samples.Cards/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.BotBuilder/Samples.BotBuilder.csproj Removes DevTools project reference from sample.
Samples/Samples.BotBuilder/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Samples.AI/Samples.AI.csproj Replaces DevTools transitive reference with explicit AspNetCore plugin reference.
Samples/Samples.AI/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Directory.Build.props Keeps TreatWarningsAsErrors enabled (format-only change in diff shown).
Samples/Deprecated.Controllers/Program.cs Removes .AddTeamsDevTools() usage.
Samples/Deprecated.Controllers/Deprecated.Controllers.csproj Removes DevTools project reference from sample.
Libraries/Microsoft.Teams.Plugins/Microsoft.Teams.Plugins.AspNetCore/Extensions/HostApplicationBuilder.cs Adds anonymous-mode startup warning when Teams ClientId is missing.
Libraries/Microsoft.Teams.Plugins/Microsoft.Teams.Plugins.AspNetCore.DevTools/README.md Adds deprecation banner pointing to Agents Playground.
Libraries/Microsoft.Teams.Plugins/Microsoft.Teams.Plugins.AspNetCore.DevTools/Microsoft.Teams.Plugins.AspNetCore.DevTools.csproj Adds deprecation package metadata and suppresses CS0618 internally.
Libraries/Microsoft.Teams.Plugins/Microsoft.Teams.Plugins.AspNetCore.DevTools/Extensions/HostApplicationBuilder.cs Marks AddTeamsDevTools() as obsolete with migration guidance.
Libraries/Microsoft.Teams.Plugins/Microsoft.Teams.Plugins.AspNetCore.DevTools/DevToolsPlugin.cs Marks DevToolsPlugin as obsolete with migration guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

corinagum and others added 3 commits May 22, 2026 14:01
Remove AddTeamsDevTools() and the ProjectReference to the DevTools
plugin from the 16 samples. The samples demonstrate the SDK without
DevTools now; users should run Microsoft 365 Agents Playground for
local testing instead.

Three samples (Samples.AI, Samples.Cards, Samples.Dialogs) were pulling
Microsoft.Teams.Plugins.AspNetCore in transitively through DevTools.
Add the explicit ProjectReference so they keep building.

Drop the project-wide CS0618 NoWarn from Samples/Directory.Build.props
now that no sample calls AddTeamsDevTools(). Add CS0618 to the DevTools
csproj's NoWarn so its internal DevToolsController can still reference
the obsolete DevToolsPlugin without breaking the build.

Add <PackageReleaseNotes> with deprecation text to the DevTools csproj
so the metadata surfaces in NuGet package browsers. Prefix the package
description with [DEPRECATED].

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Reword the anonymous-mode warning to reference Teams:ClientId, which
  is the actual configuration key (CLIENT_ID / CLIENT_SECRET /
  TENANT_ID were env-var names that don't directly match how the .NET
  SDK binds settings).
- Replace the standalone LoggerFactory.Create(b => b.AddConsole())
  with an IHostedService that uses ILogger via DI. This respects the
  host's configured logging pipeline (consumer's filters, sinks,
  formatters) instead of forcing console output.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@corinagum corinagum force-pushed the cg/devtools-deprecation branch from 05dad9f to 39f3510 Compare May 22, 2026 21:02
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