Antaris / RazorEngine

Open source templating engine based on Microsoft's Razor parsing engine
http://antaris.github.io/RazorEngine
Other
2.13k stars 578 forks source link

vs2017VSIX #556

Closed mirrortom closed 3 years ago

mirrortom commented 4 years ago

I am using RazorEngine version 4.5. In the console program, compiling cshtml files into html is no problem. Then, I added this program to the vs2017 VSIX plugin project, but found that the compilation time is very long, more than 18 minutes. I can't think of the reason. After trying, I found that adding this code to the configuration file can solve the slow compilation. But I don't understand why this is, please help me. config.CompilerServiceFactory = new RazorEngine.Roslyn.RoslynCompilerServiceFactory();