Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 13, 2025

Backport of #63909 to release/10.0

/cc @joperezr @copilot

Add UrlFormat to ObsoleteAttribute for ASPDEPR diagnostics

Fix broken documentation links in Visual Studio for deprecated ASP.NET Core APIs

Description

Updated all ASPDEPR obsoletions to use specific URL constants that point to the correct aka.ms documentation links with numeric diagnostic IDs. This ensures that when developers see these deprecation warnings in Visual Studio, the URLs will correctly link to documentation pages using just the numeric portion of the diagnostic ID.

The changes include:

  • Created specific URL constants for each diagnostic (ASPDEPR002-009) in src/Shared/Obsoletions.cs
  • Updated all 26 obsolete attribute declarations across 20 source files to use the specific URL constants
  • Added using Microsoft.AspNetCore.Shared; directive to files referencing Obsoletions constants
  • Linked Obsoletions.cs file to 10 project files that didn't already have it

This approach ensures URLs like https://aka.ms/aspnet/deprecate/003 are generated (with just the numeric part) instead of https://aka.ms/aspnet/deprecate/ASPDEPR003 (which would be incorrect).

Fixes broken documentation links for obsolete APIs in Visual Studio

Customer Impact

Developers using deprecated ASP.NET Core APIs will now see working documentation links in Visual Studio instead of broken URLs. This improves the developer experience by providing immediate access to migration guidance and deprecation information when encountering obsolete APIs.

Regression?

  • Yes
  • No

This change only adds missing UrlFormat parameters to existing obsolete attributes, improving existing functionality without changing behavior.

Risk

  • High
  • Medium
  • Low

Low risk - This change only adds URL references to existing obsolete attributes without modifying any functional code. The changes are additive and don't affect runtime behavior. All projects build successfully with the updated references.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.3

  • Make necessary changes in eng/PatchConfig.props

Copilot AI and others added 5 commits October 13, 2025 21:38
Co-authored-by: joperezr <13854455+joperezr@users.noreply.github.com>
…lFormat references

Co-authored-by: joperezr <13854455+joperezr@users.noreply.github.com>
Co-authored-by: joperezr <13854455+joperezr@users.noreply.github.com>
@joperezr joperezr added Servicing-consider Shiproom approval is required for the issue Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Oct 14, 2025
@joperezr joperezr merged commit 9fc1da3 into release/10.0 Oct 14, 2025
28 checks passed
@joperezr joperezr deleted the backport/pr-63909-to-release/10.0 branch October 14, 2025 23:21
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0.0 milestone Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants