Could Not Load Assembly .NET 4.0

10,112

Solution 1

I deleted temporary asp.net files in :

C:\users\username\AppData\Local\Temp\Temporary ASP.NET Files\

And it worked.

Solution 2

had the same problem! I found that you need to use a different location for win7/x86/x64

Clear out the temporary framework files for your project in:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\

For Windows 7, the path is:

C:\Users[username]\AppData\Local\Temp\Temporary ASP.NET Files\

For 64 bit systems with 'Framework' in the path the full path is:

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\

Found the solution here

Solution 3

Are you running this from IIS? If so check the framework version that is selected for your site.

Share:
10,112
Joseph Ghassan
Author by

Joseph Ghassan

Experienced Web Engineer who undertakes complex web projects, meets tight deadlines and delivers cutting-edge web solutions. Possesses extensive knowledge in both front-end and back-end development with over 6 years of experience in real world web applications. Applies latest technologies, follows agile practices and thrives mentoring others. Communicates and collaborates with team members and other departments to ensure on time product deliverables. Core competencies include: Microsoft .NET Tools and Libraries . N-tier Application Architecture . Single Page Application Architecture . SOLID Principles (OOP design) . Service Oriented Architecture (SOA) . UI Development and interaction . Database Development and Design . Hybrid Mobile Development . End-to-End Unit Testing . Continuous Integration . Web Performance . Web Security . Agile Practices

Updated on July 21, 2022

Comments

  • Joseph Ghassan
    Joseph Ghassan almost 2 years

    whenever I build my web solution I get this error :

    Could not load file or assembly 'dotless.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=96b446c9e63eae34' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
    

    I have VS 2010 with .NET 4.0 on Windows 7.

    The dlls are located inside the Bin folder of the Web Application.

    Any suggestions?

    Thanks.

  • Joseph Ghassan
    Joseph Ghassan over 13 years
    I am running it using VS 2010. When Rebuild all the solution I get the error. I check the solution and it is .NET 4.0
  • Saravanan
    Saravanan about 13 years
    I too got this error HRESULT: 0x80070057 when i was using the Mvc Application and the problem was in failed to load the assembly MvcContrib, the System.IO.LoadAssembly Error. I did the same and got the problem corrected.
  • Saravanan
    Saravanan about 13 years
    This will help any one facing the issues. I deleted the contents from C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files.
  • sky-dev
    sky-dev over 11 years
    Thanks! We had a power outage right before this issues started, and your solution fixed it. +1
  • yellowblood
    yellowblood over 11 years
    Had the same issue, deleted the content of C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files and it worked. Power outage here as well :) Thanks!
  • Mike McCoy
    Mike McCoy almost 11 years
    Same problem here. This answer worked for me as well. Internet outage seemed to have caused it for me.