-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
Microsoft have released an announcement notifying that Razor run-time compilation is obsolete. They call out that "Razor run-time compilation doesn't get support for new features and should no longer be used" and that it is "not recommended for production scenarios".
The focus for scenarios supported by this feature is on hot reload.
As the feature is now obsolete, we have to anticipate that it will be removed in a future major release of .NET, which at the earliest will be .NET 11 that will align with Umbraco 19.
Features in Umbraco that rely on this are the BackOfficeDevelopment runtime mode template editor and the in-memory models builder mode.
We expect to remove these features from Umbraco as of Umbraco 19, as they will no longer be supported by the underlying .NET framework.
Version
Umbraco 19+
Previous behavior
The InMemoryAuto models builder mode and the BackofficeDevelopment runtime mode are available.
New behavior
The InMemoryAuto models builder mode and the BackofficeDevelopment runtime mode will not be available Backoffice editing of templates will only be available in development environments where dotnet watch is being used.
Type of breaking change
- Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
- Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.
Reason for change
This change is necessary to follow developments in the underlying .NET platform and ensuring Umbraco can continue to run on the latest as we move forward.
Recommended action
We recommend editing template files as .cshtml views via the source code editor of your choice and publishing them along with the rest of the Umbraco project into the hosting environment. Using dotnet watch in a local development environment will allow use of hot reload.
When using Models Builder it will be necessary to use one of the other modes that involve generating models as source code files and compiling them along with the Umbraco project.