Skip to content

Commit a913bb0

Browse files
authored
Added further detail to breaking changes for 17 relating to models builder and Razor runtime compilation
1 parent 0c18a33 commit a913bb0

File tree

1 file changed

+10
-3
lines changed
  • 17/umbraco-cms/fundamentals/setup/upgrading/version-specific

1 file changed

+10
-3
lines changed

17/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,18 @@ For more details on this update see the following PRs: [#19705](https://github.c
6363

6464
**InMemoryAuto models builder and razor runtime compilation has moved into its own package**
6565

66-
InMemoryAuto models builder has been moved into a new package `Umbraco.Cms.DevelopmentMode.Backoffice` along with the reference to `Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation` and associated code.
66+
`InMemoryAuto` models builder has been moved into a new package `Umbraco.Cms.DevelopmentMode.Backoffice` along with the reference to `Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation` and associated code.
6767

68-
This change has been made due to the [obsoletion of Razor run-time compilation in .NET](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete). InMemoryAuto depends on Razor run-time compilation, and Razor run-time compilation is not compatible with hot reload. This means that as long as InMemoryAuto exists in the codebase, we cannot enable hot reload. To enable working towards hot reload being the default developer experience, we have moved InMemoryAuto into its own package.
68+
This change has been made due to the [obsoletion of Razor run-time compilation in .NET](https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete). `InMemoryAuto` depends on Razor run-time compilation, and Razor run-time compilation is not compatible with hot reload. This means that as long as InMemoryAuto exists in the codebase, we cannot enable hot reload. To enable working towards hot reload being the default developer experience, we have moved InMemoryAuto into its own package.
6969

70-
If you use InMemoryAuto models builder, or rely Razor runtime compilation in editing templates via the backoffice, you need to reference the `Umbraco.Cms.DevelopmentMode.Backoffice` package.
70+
If you use `InMemoryAuto` models builder, or rely Razor runtime compilation in editing templates via the backoffice, you need to reference the `Umbraco.Cms.DevelopmentMode.Backoffice` package.
71+
72+
If using models builder with one of the source code modes (i.e. not `InMemoryAuto`) you do not need to reference the `Umbraco.Cms.DevelopmentMode.Backoffice` package. However you will need to ensure the following settings are removed from your in your .csproj file:
73+
74+
```
75+
<RazorCompileOnBuild>false</RazorCompileOnBuild>
76+
<RazorCompileOnPublish>false</RazorCompileOnPublish>
77+
```
7178

7279
If you use the RoslynCompiler class in Umbraco, you need to reference the `Umbraco.Cms.DevelopmentMode.Backoffice` package and update your namespace usings.
7380

0 commit comments

Comments
 (0)