roslyn in MVC

If you're using VS 2015 for development, ASP.NET projects now use Roslyn by default. The host I use as a test server doesn't support Roslyn / C# 6.0 yet. Though the website gets published successfully (using Web Deploy), I end up with an Internal Server Error.

According to this, roslyn support is added using a nuget package. So the first thing to do, is to remove the package. Open the Package Manager Console and type the following one line at a time: 





 Run the below step by step

uninstall-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform  
uninstall-package Microsoft.Net.Compilers 
 
Now Remove this from Webconfig 
 
<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=\&quot;Web\&quot; /optionInfer+" />
    </compilers>
  </system.codedom>
 
You are done :)  

Comments

Post a Comment

Your comment or feedback help me to write more blogs. Please add your comments.

Popular posts from this blog

How to Stop Excel from giving a number in scientific notation

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory