• Register
1 vote
2k 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.
7.5k points

Please log in or register to answer this question.

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>

38.6k points

Related questions

0 votes
1 answer 30 views
30 views
Problem: Have anybody faced this issue before ,Any solution on my issue: Could not load file or assembly 'microsoft.codedom.providers.dotnetcompilerplatform .
asked Mar 14 Wafa Abu Yousef 6.1k points
0 votes
1 answer 112 views
112 views
Problem: I recently installed Microsoft SQL Server Management Studio 2017.5 in order to connect to some Azure resources. When attempting to connect to any db (including my localhost) I get an error saying: 'Could not load file or assembly 'Microsoft. ... directory Reinstall SSMS 17.5 and it should work now. Looks like its a partial removal on upgrading from previously installed versions.
asked May 2 padma1 34.8k points
0 votes
1 answer 9 views
9 views
Problem: Type or namespace system could not be found.
asked Jul 11 Florina Gulnar 106k points
0 votes
1 answer 14 views
14 views
Problem: The type or namespace system could not be found?
asked Jul 2 Mezbah 130k points
0 votes
1 answer 5 views
5 views
Problem: Windows 10 server dns address could not be found.
asked Jul 1 Florina Gulnar 106k points
0 votes
1 answer 28 views
28 views
Problem: I'm not sure what I'm going to do with this issue : Teamspeak cannot write to the configuration file.
asked May 24 Florina Gulnar 106k points
0 votes
1 answer 52 views
52 views
Problem: I'm not sure where this came from : Teamspeak 3 cannot write to the configuration file.
asked May 22 Florina Gulnar 106k points
0 votes
1 answer 2 views
2 views
Problem: What exactly is the solution : Could not load file or assembly microsoft identitymodel
asked Jun 25 Nahil 128k points
0 votes
1 answer 23 views
23 views
Problem: created my routing in my app. module. But when I run this I get the following error: Router-outlet' is not a known element: It gives an error telling me that Visual Studio cannot resolve the tag 'router outlet. Any suggestions on how I can fix this error?
asked Mar 27 ummesalma 29.1k points
0 votes
1 answer 17 views
17 views
Problem: Need to facilitate with this : Could not load file or assembly microsoft.codeanalysis
asked Jun 26 Sawyer Parviz 168k points