Breaking changes to runtime compilation for Razor views and Razor Pages #343
Labels
3.0.0
Announcements related to ASP.NET Core 3.0
Announcement
Breaking change
Documented
The breaking change has been published to the .NET Core docs
Migrated
Milestone
Uh oh!
There was an error while loading. Please reload this page.
As a consequence of cleaning up the ASP.NET Core shared framework to not depend on Roslyn, support for runtime compilation of Razor views and Razor Pages is being moved to a separate package.
Applications that require runtime compilation or re-compilation of Razor files should
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
packageConfigureServices
to include a call toAddMvcRazorRuntimeCompilation
:The following APIs previously available on
Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions
to support runtime compilation would now be available viaMicrosoft.AspNetCore.Mvc.Razor.RuntimeCompilation.MvcRazorRuntimeCompilationOptions
:RazorViewEngineOptions.FileProviders
->MvcRazorRuntimeCompilationOptions.FileProviders
RazorViewEngineOptions.AdditionalCompilationReferences
->MvcRazorRuntimeCompilationOptions.AdditionalReferencePaths
In addition,
Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.AllowRecompilingViewsOnFileChange
has been removed. Recompilation on file changes is enabled by default by referencing theMicrosoft.AspNetCore.Mvc.Razor.RuntimeCompilation
package.Related issues: #312, #325
Please use dotnet/aspnetcore#7647 for further discussions or questions.
This announcement has been migrated to dotnet/docs#14925
The text was updated successfully, but these errors were encountered: