Skip to content

Commit 89ea75c

Browse files
authored
Merge pull request #7491 from umbraco/cms/17-breaking-changes-additional
Added further detail to breaking changes for 17 relating to models builder and Razor runtime compilation
2 parents 5a72de8 + 8bd3d0b commit 89ea75c

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 was 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, which is not compatible with Hot Reload. As long as `InMemoryAuto` exists in the codebase, Hot Reload cannot be enabled. To work towards making Hot Reload the default developer experience, `InMemoryAuto` has been moved 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 on Razor runtime compilation for 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 (that is, not `InMemoryAuto`), you do not need to reference the `Umbraco.Cms.DevelopmentMode.Backoffice` package. However, ensure the following settings are removed from 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)