Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Discussion] Breaking changes to runtime compilation for Razor views and Razor Pages #7647
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.
The following APIs previously available on
After adding a reference to
Is there any way to set
In your csproj
Then in your startup, use pre processor directive
And also in your csproj add that condition to the package reference!
Will this be available for .net standard 2.0?
I currently have my razor view compilation in a .net standard 2.0 class library referenced in the web app and when trying to upgrade my web app to use .net core 3 it fails with the following error message:
I am unable to reference the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package in my class library as this package depends on netcoreapp 3.
The code I have working on .net 2,1 atm is based on https://github.com/mikebrind/RazorEngineViewOptionsFileProviders.
What is the best upgrade path to get this working again with net core 3.0 and still have my razor compilation code in a separate library using net standard 2.0?