-
Notifications
You must be signed in to change notification settings - Fork 43
Fail to copy Roslyn compiler bits to the right location on build server #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also affected by this problem. |
I'm also affected by this. I need to be able to control the path. |
Actually, my question is why do we even need to shell csc.exe in the 1st place? Why can't we just use the Roslyn API to compile the code? |
@ejsmith DotNetCompilerPlatform is for runtime compilation(e.g. aspx/cshtml/global.asax etc..). It is implemented as a language provider which is the only way asp.net provides to do the runtime compilation. |
@Jinhuafei Yes, we get that, but it's implemented as a code Dom provider which just shells the compiler with command line arguments. What we are asking is why doesn't the code dom provider just compile in process using roslyn instead of shelling it (an out of process compiler which uses roslyn). |
The problem was controlling the memory allocated by the compiler in certain cases. There are some generated code patterns that the aspx code generator generates that cause the Roslyn compiler to either stackoverflow or run out of memory parsing. The only way to fix that was to run then compiler out of process (since there were no changes being made to code gen) |
@davidfowl that makes sense. Is ASPNET Core still taking the out of process approach as well then? |
David is right. We tried both, and out-proc compilation model works better. Besides what David mentioned, we also saw working set increment in w3wp process when using in-proc compilation. |
We discussed it but haven't built in the infrastructure to make that work as well as ASP.NET (see ASP.NET Temporary Files). We also changed some of the code generation patterns in Razor to help the issue a bit. On top of that, we also now pre-compile views by default in on publish so your production site should never really be using roslyn at runtime. |
The fix is included in 1.0.6 release |
See SO issue.
The text was updated successfully, but these errors were encountered: