public RazorViewCompiler(IFileSystem fileSystem, IRazorConfiguration razorConfiguration) { this.fileSystem = fileSystem; this.razorConfiguration = razorConfiguration; this.razorTemplateEngine = BuildRazorTemplateEngine(RazorProjectFileSystem.Create(this.fileSystem.GetFullPath("~/"))); var defaultTagHelpers = razorConfiguration.GetDefaultTagHelpers(); var defaultDirectivesProjectItem = new DefaultDirectivesProjectItem(this.razorConfiguration.GetDefaultNamespaces(), defaultTagHelpers); this.defaultImports = new[] { RazorSourceDocument.ReadFrom(defaultDirectivesProjectItem) }; this.GetReferenceAssemblies(); }