Skip to content

Remove long-obsolete MVC APIs targeted for removal - #67077

Merged
Youssef1313 merged 7 commits into
mainfrom
copilot/revise-obsolete-apis
Jun 24, 2026
Merged

Remove long-obsolete MVC APIs targeted for removal#67077
Youssef1313 merged 7 commits into
mainfrom
copilot/revise-obsolete-apis

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Remove long-obsolete MVC APIs targeted for removal

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Remove obsolete MVC APIs and track removals in unshipped baselines

Description

This removes APIs that have been obsolete for multiple releases and were intended to be deleted.
The change trims the MVC surface area by removing dead compatibility APIs and obsolete overloads/members.

  • MVC TagHelpers API cleanup

    • Removed obsolete ImageTagHelper constructor taking IWebHostEnvironment and TagHelperMemoryCacheProvider.
    • Removed obsolete ImageTagHelper.HostingEnvironment and ImageTagHelper.Cache members.
  • MVC compatibility API removal

    • Removed CompatibilityVersion.
    • Removed obsolete SetCompatibilityVersion(...) extension methods from MVC builder/core builder extensions.
    • Removed tightly coupled obsolete compatibility infrastructure types:
      • MvcCompatibilityOptions
      • ConfigureCompatibilityOptions<TOptions>
    • Removed now-obsolete compatibility test coverage tied to those types.
  • Model metadata API cleanup

    • Removed obsolete ModelMetadataIdentity.ForProperty(Type, string, Type) overload.
    • Updated tests to use the PropertyInfo-based overload.
  • Public API baselines

    • Reverted all PublicAPI.Shipped.txt changes made by this PR.
    • Recorded corresponding removals in PublicAPI.Unshipped.txt with *REMOVED* entries for:
      • Mvc.TagHelpers
      • Mvc.Core
      • Mvc.Abstractions
// before
ModelMetadataIdentity.ForProperty(typeof(int), "Property1", typeof(string));

// after
ModelMetadataIdentity.ForProperty(
    typeof(MyContainer).GetProperty(nameof(MyContainer.Property1))!,
    typeof(int),
    typeof(MyContainer));

Comment thread src/Mvc/Mvc.Abstractions/src/PublicAPI.Shipped.txt
Comment thread src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt
Comment thread src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt
Comment thread src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt
Comment thread src/Mvc/Mvc.Core/src/PublicAPI.Shipped.txt
@Youssef1313

Copy link
Copy Markdown
Member

@copilot Revert all changes to PublicAPI.Shipped.txt, and move the corresponding entries to PublicAPI.Unshipped.txt with *REMOVED* prefix.

Copilot AI commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Revert all changes to PublicAPI.Shipped.txt, and move the corresponding entries to PublicAPI.Unshipped.txt with *REMOVED* prefix.

Done in 9a32e8d.

@Youssef1313
Youssef1313 marked this pull request as ready for review June 17, 2026 12:02
@Youssef1313
Youssef1313 requested a review from a team as a code owner June 17, 2026 12:02
Copilot AI review requested due to automatic review settings June 17, 2026 12:02
Copilot AI and others added 6 commits June 24, 2026 08:17
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
@Youssef1313
Youssef1313 force-pushed the copilot/revise-obsolete-apis branch from 999d618 to 5708eba Compare June 24, 2026 06:17
@Youssef1313
Youssef1313 merged commit ae22b8b into main Jun 24, 2026
25 checks passed
@Youssef1313
Youssef1313 deleted the copilot/revise-obsolete-apis branch June 24, 2026 15:18
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jun 25, 2026
@Youssef1313 Youssef1313 added breaking-change This issue / pr will introduce a breaking change, when resolved / merged. needs-breaking-change-announcement Indicates that breaking change announcement shuold be posted and linked to this PR labels Aug 5, 2026
@Youssef1313 Youssef1313 added breaking-change This issue / pr will introduce a breaking change, when resolved / merged. needs-breaking-change-announcement Indicates that breaking change announcement shuold be posted and linked to this PR and removed breaking-change This issue / pr will introduce a breaking change, when resolved / merged. needs-breaking-change-announcement Indicates that breaking change announcement shuold be posted and linked to this PR labels Aug 6, 2026
@dotnet-policy-service

dotnet-policy-service Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for identifying a breaking change.

@Youssef1313, @copilot, after you commit this PR please take the following actions, as part of the breaking changes announcement process:

  • Create an announcement issue by using the ASP.NET Core breaking change issue template.
  • Link the breaking change announcement issue from this PR.
  • Remove the needs-breaking-change-announcement label.

@Youssef1313 Youssef1313 removed the needs-breaking-change-announcement Indicates that breaking change announcement shuold be posted and linked to this PR label Aug 6, 2026
@Youssef1313

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates breaking-change This issue / pr will introduce a breaking change, when resolved / merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revise obsolete APIs intended to be removed, and consider removing in .NET 11

4 participants