You now need to register the Expander, in order for it to be used by the Razor View Engine. Just add this in the ConfigureServices of your Startup class.
public void ConfigureServices(IServiceCollection services)
{
services.Configure<RazorViewEngineOptions>(options => {
options.ViewLocationExpanders.Add(new MyViewLocationExpander());
});
}