System.TypeLoadException: Failed to load type from assembly

Today I started this nasty problem while trying to run my web application.

The scenario is as follows:

I have a web application project (WAP from now on) and 4 library projects (BusinessEntities, BusinessLogic, DataAccess and Utils).

DataAccess Links BusinessEntities BusinessLogic Links BusinessEntities and DataAccess WAP links to BusinessLogic, BusinessEntities and DataAccess

When I launch WAP, I get

System.TypeLoadException: Failed to load type 'Namespace.DataAccess.ClassDataAccess' from assembly' DataAccessAssembly ', Version = 1.0.3551.29465, Culture = neutral, PublicKeyToken = null'.

This is when a method from BusinessLogic tries to throw an exception to the DataAccess class. I am using a reflector on the DataAccess dll inside the bin folder in WAP, and it contains the class that I am calling.

I already tried to delete the temporary asp.net file, but to no avail, I use Cassini as a web server (I have not tried IIS yet)

Thanks.

+3
source share
4 answers

It is likely that you have a few confused version numbers in your links.

Check the project links, the web.config file, and the .dll version to make sure all of your links are correct.

+4
source

, SDK fuslogvw.exe( ). , .

+4

(TypeLoadException InnerException DLL, , , ). , DLL ( Foo.DomainService.dll Foo.DomainService.Web.dll).

+1

InnerException

0

Source: https://habr.com/ru/post/1718231/


All Articles