React to Razor changes

This commit is contained in:
Ryan Nowak 2017-05-16 13:49:24 -07:00
parent 51c142ae91
commit 97bbdafde3
1 changed files with 6 additions and 2 deletions

View File

@ -169,10 +169,14 @@ namespace Microsoft.Extensions.DependencyInjection
{
RazorExtensions.Register(b);
b.Features.Add(new Microsoft.CodeAnalysis.Razor.DefaultTagHelperFeature());
// Roslyn + TagHelpers infrastructure
var metadataReferenceFeature = s.GetRequiredService<LazyMetadataReferenceFeature>();
b.Features.Add(metadataReferenceFeature);
b.Features.Add(new Microsoft.CodeAnalysis.Razor.CompilationTagHelperFeature());
// TagHelperDescriptorProviders (actually do tag helper discovery)
b.Features.Add(new Microsoft.CodeAnalysis.Razor.DefaultTagHelperDescriptorProvider());
b.Features.Add(new Microsoft.CodeAnalysis.Razor.ViewComponentTagHelperDescriptorProvider());
});
});