• Register
1 vote
707 views

Problem :

The below errors are often thrown when I try to run my ASP.NET MVC5 Web Project.

Have anybody faced this issue before ?

Any solution on my issue?

Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///C:/Users/Alecxe/Documents/git/Project2.2/HaarlemFestival-Web/
 LOG: Initial PrivatePath =         C:\Users\Alecxe\Documents\git\Project2.2\HaarlemFestival-Web\bin
Calling assembly : (Unknown)
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\Alecxe\Documents\git\Project2.2\HaarlemFestival-Web\web.config
LOG: Using host configuration file: C:\Users\Alecxe\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference:     Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Users/Alecxe/AppData/Local/Temp/Temporary ASP.NET Files/vs/b2d7334d/e3876cf7/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.DLL.
LOG: Attempting download of new URL file:///C:/Users/Alecxe/AppData/Local/Temp/Temporary ASP.NET     Files/vs/b2d7334d/e3876cf7/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.DLL.
LOG: Attempting download of new URL file:///C:/Users/Alecxe/Documents/git/Project2.2/HaarlemFestival-    Web/bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Build Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
6 5 3
7,540 points

1 Answer

0 votes

Solution :

We just had the error same as your error in one of our environments. The problem was in our web.config file. The section had settings to reference our DotNetCompilerPlatform assembly, but it had the wrong version number. So we just updated web.config to the correct version number and it fixed our error as shown below:

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

</compilers>

9 7 4
38,600 points

Related questions

0 votes
1 answer 15 views
15 views
Problem: I have tried to upload my website to a server for the very first time. My website was working fine at my local host so I tried to upload everything from my localhost to the server and then I also changed the connection string. But still I ... dependencies. The system cannot find the file specified. at RouteDebug.PreApplicationStart.Start() What should I do to fix the above server error?
asked Aug 26 Raphael Pacheco 4.9k points
0 votes
1 answer 9 views
0 votes
1 answer 20 views
1 vote
1 answer 30 views
30 views
Problem : I am very new to ASP.NET. I have recently tried to install ASP.NET and Web Tools. After installing the new ASP.NET and Web Tools 2015 (RC1 update 1) I am often facing the below error within my ASP.NET MVC 4 projects if I try to open the *. ... of time in fixing above error but still face the same visual studio error. So I am looking for Visual Studio experts help in fixing above error.
asked May 12 stewart 4k points