註冊 View Location Expander
你現在需要註冊 Expander,以便 Razor View Engine 使用它。只需在你的 Startup 類的 ConfigureServices 中新增它。
public void ConfigureServices(IServiceCollection services)
{
services.Configure<RazorViewEngineOptions>(options => {
options.ViewLocationExpanders.Add(new MyViewLocationExpander());
});
}