Closed
Description
Runtime view compilation appears to not be working in .NET 6 Razor Pages projects when using the environment variable to specify this behavior as described here:
If I manually add AddRazorRuntimeCompilation()
in ConfigureServices it does work though.
I'm including v6.0.0 of the assembly package:
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.0" />
And my launch profile has the following section:
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"
}
Worked as expected in .NET 5 on the same project.