Title asked it all,
Do dynamically compiled files, such as .cshtml files, use csc.exe in .NET?
I saw this question C# JIT compiling and .NET
But it doesn't fully go into the compilation of a dynamic file to before being Jit'ed.
So you have this site https://msdn.microsoft.com/en-us/library/ms366723.aspx. Which says:
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.
So am I to understand that csc.exe runs on first request of a new resource before being JIT'ed?
The short answer appears to be yes.
"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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With