Another Strange ASP.net Error: The compiler failed with error code 255

The solution was working locally for me but from server I was getting this error 'The compiler failed with error code 255'.

It worked for me by uninstalling the nuget package 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform' from my solution and redeploying.


Remove the compilers tag from the web.config file:

<compilers>
    <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider,  Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.4.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.4.0,     Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4"     compilerOptions="/langversion:14 /nowarn:41008     /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
</compilers>

I'm running Win2k12 R2 as a desktop OS and yesterday upgraded vs2k13 to vs2k15 after which some of my .NET 4.5 web applications stopped working with the above error "The compiler failed with error code 255", a bit of Googling and I came up with the below;

https://support.microsoft.com/en-us/kb/3118750

I was scenario #2 in the above article - ultimately I just uninstalled KB3098779 and KB3097997, rebooted and the applications worked again, happy days.

Tags:

Asp.Net

Iis