动态编译的文件在 .NET 中使用 csc.exe 吗?

Do dynamically compiled files use csc.exe in .NET?

标题问了一切,

做动态编译的文件,比如.cshtml文件,在.NET中使用csc.exe?

我看到了这个问题C# JIT compiling and .NET

但是在被 Jit 之前,它并没有完全进入动态文件的编译。

所以你有这个网站 https://msdn.microsoft.com/en-us/library/ms366723.aspx。 其中说:

By default, ASP.NET Web pages and code files are compiled dynamically when users first request a resource, such as an ASP.NET page (.aspx file), from a Web site. After pages and code files have been compiled the first time, the compiled resources are cached, so that subsequent requests to the same page are extremely efficient.

所以我是否理解 csc.exe 在 JIT 之前在第一次请求新资源时运行?

简短的回答似乎是肯定的。

"the Roslyn compiler would be loaded into memory, improving greatly performance for not pre-compiled websites with multiple .asx/*.cshtml files. The new version, however, features a new /bin/roslyn/csc.exe file, which is executed once per file, completely removing the mentioned above optimization feature"