注册 View Location Expander
你现在需要注册 Expander,以便 Razor View Engine 使用它。只需在你的 Startup 类的 ConfigureServices 中添加它。
public void ConfigureServices(IServiceCollection services)
{
services.Configure<RazorViewEngineOptions>(options => {
options.ViewLocationExpanders.Add(new MyViewLocationExpander());
});
}