Skip to content

Instantly share code, notes, and snippets.

@scottsauber
Created April 25, 2016 03:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottsauber/018f4d633e06ff4d713f73fc99698b52 to your computer and use it in GitHub Desktop.
Save scottsauber/018f4d633e06ff4d713f73fc99698b52 to your computer and use it in GitHub Desktop.
// Include this after .AddMvc under ConfigureServices in Startup.cs
services.Configure<RazorViewEngineOptions>(options =>
{
options.ViewLocationExpanders.Add(new FeatureLocationExpander());
});
@mattcan
Copy link

mattcan commented Apr 17, 2017

For those of us not in Visual Studio, you'll want a using Microsoft.AspNetCore.Mvc.Razor; at the top. In .NET Core 1.1 at least

https://docs.microsoft.com/en-us/aspnet/core/api/microsoft.aspnetcore.mvc.razor.razorviewengineoptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment