• Register
1 vote
1.4k 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

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>

9 7 4
38,600 points

Related questions

0 votes
1 answer 9 views
9 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 3 views
3 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 24.5k points
0 votes
1 answer 31 views
31 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, 2020 Raphael Pacheco 4.9k points
1 vote
1 answer 2 views
2 views
Problem : Yesterday, issue was reproducing after one month period of working. I can't afford this issue on production : Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MainCore.DbImpl, Version=0.0.0.0, Culture=neutral, PublicKeyToken ... exception stack trace below. Version Information: Microsoft .NET Framework Version:2.0.50727.5446; ASP.NET Version:2.0.50727.5420
asked 5 days ago Shovo210 13.3k points
0 votes
1 answer 2 views
2 views
Problem: Hello ... Can anyone tell me that why I got this error? Could not load file or assembly or one of its dependencies
asked Apr 3 Ifra 24.4k points
1 vote
1 answer 4 views
4 views
Problem: I am recieving this error on my website. Could not load file or assembly ajaxcontroltoolkit.
asked Mar 23 PkGuy 13.1k points
0 votes
1 answer 4 views
4 views
Problem: I am stuck with this ... Please help me that how to deal with this error?Could not load file or assembly mysql data
asked Mar 21 Ifra 24.4k points
0 votes
1 answer 6 views
6 views
system badimageformatexception could not load file or assembly
asked Feb 16 ArifulIslam 7.5k points
0 votes
1 answer 10 views
10 views
Problem: Hi there! I am trying to run following program: using System; using System.IO; namespace ConsoleApp2 { class Program { public static void Main(string[] args) { FileStream fs = File.Open("e:\\file.txt", FileMode.Open); Console.ReadKey(); } ... .IOFileNotFoundException could not load file or assembly I want to know why these exceptions are thrown by the compiler and how to resolve them?
asked Dec 4, 2020 Code Learner 9.2k points