public static void AdjustViewEngines(ViewEngineCollection viewEngines) { // Turn off WebFormViewEngine. Use Razor only. var webformViewEngine = viewEngines.OfType <WebFormViewEngine>().FirstOrDefault(); if (webformViewEngine != null) { viewEngines.Remove(webformViewEngine); } // Activate MvcCodeRouting view wrapper viewEngines.EnableCodeRouting(); }
public static void RegisterViewEngines(ViewEngineCollection viewEngines) { viewEngines.EnableCodeRouting(); }