Could not load file or assembly or one of its dependencies

0

I changed some names of namespaces, assemblies in one of existing project (C# and ASP.NET). But when I try to debug it; I get this error.

Could not load file or assembly 'HR' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

I have replaced DFI with HR in the code.

asp.net
c#-3.0
assemblies
asked on Stack Overflow Mar 15, 2010 by kp. • edited May 15, 2010 by Jon Seigel

3 Answers

1

If your project compiles, you may be referencing the assembly in a config file. I would check anywhere that you may be using late binding to reference a type. Also check your @Page directives as you may have an assembly qualified type reference that is referring to the old HR assembly.

answered on Stack Overflow Mar 15, 2010 by Athens Holloway • edited Aug 29, 2018 by Athens Holloway
1

Sometime I have got such error and began to research how to resolve it. After all I just have added such attribute to web.config compilation node:

<compilation debug="true" tempDirectory="c:\temp" >

I hope that this can help and other people.

answered on Stack Overflow Dec 14, 2010 by apros
1

I also got this terrible error and found a solution for this...

  1. Right Click on the Solution name
  2. Click Clean Solution
  3. Restart
  4. Goto project Properties >> Build
  5. Change Configuration to Release
  6. Start Debugging (F5)

1) , 2)

Right Click on the Solution name

4) , 5)

Change Configuration to Release

Hope this will help you also.

answered on Stack Overflow Sep 17, 2015 by Roshana Pitigala

User contributions licensed under CC BY-SA 3.0