Skip to content

Document Razor runtime compilation obsolescence in .NET 10 #47898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 8, 2025

This PR documents the breaking change announced in aspnet/Announcements#522 regarding Razor runtime compilation being obsoleted in .NET 10 Preview 7.

Changes Made

  • Created new directory: /docs/core/compatibility/aspnet-core/10.0/ for ASP.NET Core 10.0 breaking changes
  • Added breaking change documentation: razor-runtime-compilation-obsolete.md that documents:
    • The obsolescence of Razor runtime compilation APIs
    • The new compiler warning ASPDEPR003 and its message
    • Migration guidance: remove .AddRazorRuntimeCompilation() calls and use Hot Reload for development
    • All affected APIs from the announcement
  • Updated main breaking changes summary: Added ASP.NET Core section to 10.0.md with the new breaking change entry

Key Details

The documentation follows the established pattern for ASP.NET Core breaking change docs and provides clear guidance for developers:

  • Production scenarios: Use default build time compilation (no action needed)
  • Development scenarios: Use Hot Reload via dotnet watch instead of runtime compilation
  • Warning message: Clearly explains the deprecation and points to migration guidance

The affected APIs include:

  • Microsoft.Extensions.DependencyInjection.RazorRuntimeCompilationMvcBuilderExtensions.AddRazorRuntimeCompilation
  • Microsoft.Extensions.DependencyInjection.RazorRuntimeCompilationMvcCoreBuilderExtensions.AddRazorRuntimeCompilation
  • Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.MvcRazorRuntimeCompilationOptions
  • And others listed in the announcement

All markdown linting passes and the documentation is ready for publication.

Fixes #47621.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Internal previews

📄 File 🔗 Preview link
docs/core/compatibility/10.0.md Breaking changes in .NET 10
docs/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete.md Razor run-time compilation is obsolete
docs/core/compatibility/toc.yml docs/core/compatibility/toc

@Copilot Copilot AI changed the title [WIP] Document https://github.com/aspnet/Announcements/issues/522 Document Razor runtime compilation obsolescence in .NET 10 Aug 8, 2025
@Copilot Copilot AI requested a review from gewarren August 8, 2025 18:26
Copilot finished work on behalf of gewarren August 8, 2025 18:26
@gewarren gewarren marked this pull request as ready for review August 8, 2025 20:39
@gewarren gewarren requested a review from a team as a code owner August 8, 2025 20:39
@gewarren gewarren requested a review from BrennanConroy August 8, 2025 20:40
@BrennanConroy BrennanConroy requested a review from danroth27 August 8, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document https://github.com/aspnet/Announcements/issues/522
2 participants