Skip to content

Commit 7c317c5

Browse files
Copilottdykstra
andauthored
Add .NET 10 obsolescence note to Razor runtime compilation docs (#36722)
* Add obsolescence note for Razor runtime compilation in .NET 10 Co-authored-by: tdykstra <1569635+tdykstra@users.noreply.github.com> * Update aspnetcore/mvc/views/view-compilation.md * Update runtime compilation note in view-compilation.md Clarified note on runtime compilation obsolescence in .NET 10. * Reorder note about Razor runtime compilation and Hot Reload --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tdykstra <1569635+tdykstra@users.noreply.github.com> Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
1 parent c1c0f50 commit 7c317c5

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

aspnetcore/mvc/views/view-compilation.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
title: Razor file compilation in ASP.NET Core
3+
ai-usage: ai-assisted
34
author: tdykstra
45
description: Learn how compilation of Razor files occurs in an ASP.NET Core app.
56
monikerRange: '>= aspnetcore-3.1'
67
ms.author: tdykstra
78
ms.custom: mvc
8-
ms.date: 03/20/2023
9+
ms.date: 01/30/2026
910
uid: mvc/views/view-compilation
1011
---
1112
# Razor file compilation in ASP.NET Core
@@ -15,12 +16,7 @@ uid: mvc/views/view-compilation
1516
Razor files with a `.cshtml` extension are compiled at both build and publish time using the [Razor SDK](xref:razor-pages/sdk). Runtime compilation may be optionally enabled by configuring the project.
1617

1718
> [!NOTE]
18-
> Runtime compilation:
19-
> * Isn't supported for Razor components of Blazor apps.
20-
> * Doesn't support [global using directives](/dotnet/csharp/whats-new/csharp-10#global-using-directives).
21-
> * Doesn't support [implicit using directives](/dotnet/core/tutorials/top-level-templates#implicit-using-directives).
22-
> * Disables [.NET Hot Reload](xref:test/hot-reload).
23-
> * Is recommended for development, not for production.
19+
> **Runtime compilation is obsolete in .NET 10. For more information, see [Razor runtime compilation is obsolete](/dotnet/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete).**
2420
2521
## Razor compilation
2622

@@ -29,7 +25,7 @@ Build-time and publish-time compilation of Razor files is enabled by default by
2925
Updating Razor views and Razor Pages during development while the app is running is also supported using [.NET Hot Reload](xref:test/hot-reload).
3026

3127
> [!NOTE]
32-
> When enabled, runtime compilation disables [.NET Hot Reload](xref:test/hot-reload). We recommend using Hot Reload instead of Razor runtime compilation during development.
28+
> Razor runtime compilation is obsolete in .NET 10. When enabled, runtime compilation disables [.NET Hot Reload](xref:test/hot-reload). We recommend using Hot Reload instead for development scenarios. For more information, see [Razor runtime compilation is obsolete](/dotnet/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete).
3329
3430
## Enable runtime compilation for all environments
3531

0 commit comments

Comments
 (0)