What exactly does <system.codedom> / <compilers> do in web.config in MVC 5?
I'm going to migrate a bunch of projects from .NET 4.0 + MVC 3 to .NET 4.5.2 + MVC5.
To make this easier, I created a new empty MVC project to compare DLL links and some other materials like web.config.
In the latter case, Visual Studio creates the following entries:
<system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/> <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/> </compilers> </system.codedom> But I do not know what exactly this does. MVC 3 projects do not contain these parts. I understand that this has something to do with Roslin?
+17
MarioDS Dec 31 '15 at 11:06 2015-12-31 11:06
source share1 answer
These options are used for dynamic compilation . They can be safely removed from web.config if you precompile and only put the compiled assemblies on the web server.
See also Effect of several compiler definitions in system.codedom in web.config
+25
Jochen Dec 31 '15 at 11:12 2015-12-31 11:12
source share