You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
DependencyContextViewEngineOptionsSetup and RazorViewEngineOptionsSetup modify compilation options - the first based on what's specified in the dependency context and second based on IHostingEnviornment.EnvironmentName. However the former setup's option values are always overwritten by RazorViewEngineOptionsSetup which runs second.
@rynowak - the current behavior is Development -> Debug, Staging \ Production etc -> Release, so it's not entirely too bad. However, if you had "optimize": true in your project.json while in Development, views would continue to compile in Debug. You can use the RazorViewEngineOptions.CompilationOptions to change this:
DependencyContextViewEngineOptionsSetup
andRazorViewEngineOptionsSetup
modify compilation options - the first based on what's specified in the dependency context and second based onIHostingEnviornment.EnvironmentName
. However the former setup's option values are always overwritten byRazorViewEngineOptionsSetup
which runs second.Additionally, the value set in
OptimizationLevel
determined inDependencyContextViewEngineOptionsSetup
is incorrect - https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DependencyContextRazorViewEngineOptionsSetup.cs#L60-L62 needs to be inverted so that when your project.json saysoptimize
, we chooseRelease
.The text was updated successfully, but these errors were encountered: