What / why is Roslyn "needed" in /bin folder of Asp.Net

This is taken from MSDN forum.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/442b100a-2b88-4ac4-b655-0c1345791f15/roslyn-cscexe-web-api-2-on-hosting-server?forum=msbuild

I have noticed a minor drawback to uninstalling this package:

https://www.nuget.org/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform

Some of the new C# 6.0 language features if used in Views (MVC project) will not compile. Many of my views use the ?. null checking operator for accessing Model properties. All of these views now return errors on my Godaddy hosted MVC 5 application.

This error occurs because Views (by default) are compiled at runtime using the .NET pipeline (not pre-compiled).

To resolve this issue, simply uncheck the "Allow precompiled site to be updatable" option in your publish profile settings. This should pre-compile your views and allow your C# 6.0 (Latest version of Roslyn Compiler) to run like a champ.

Just wanted anyone looking at this question to know the ramification of uninstalling it and why its there in the first place


Was running into this issue all the time in Visual Studio 2017 Community Edition where the project could not be rebuilt because the older files in bin/roslyn could not be deleted. Based on the OP's Gold comment, I now keep the Task Manager open (Ctrl+Shift+Esc) and kill the VBCS.exe process. The offending files in bin/roslyn can now be deleted.


Another feature of it is that it does not require build servers to actually have compiler dependencies. You send the compiler you want to use WITH the code to the build server and it just uses exactly what you told it to.