c# - TypeLoadExeception calling Class Library from Application_Start -


i working .net 4.5 web api project (project #1) , getting weird error. built 1 project. have found want break business logic (project bll) separate class library can reused in other projects. have gone through process of breaking apart , have found works project #2. when try , run project #1 have weird issue getting typeloadexception in application_start when try , call function in project bll. call same function in project #2 without problem. issue seems in project #1 worked fine before split. exact error message getting is:

could not load type 'project.bll.mappers.v1.automapperconfiguration' assembly 'project.bll, version=1.0.0.0, culture=neutral, publickeytoken=null'.  

within project #1 able use intelesense , f12 (go definition) see 2 projects appear wired correctly. thoughts?

update: here entire stack trace. not hit breakpoint in global.asax.cs can't inner exception:

 [typeloadexception: not load type 'project.bll.mappers.v1.automapperconfiguration' assembly 'project.bll, version=1.0.0.0, culture=neutral, publickeytoken=null'.]    project.bll.webapiapplication.application_start() in d:\solutions\project_1\global.asax.cs:58  [httpexception (0x80004005): not load type 'project.bll.mappers.v1.automapperconfiguration' assembly 'project.bll, version=1.0.0.0, culture=neutral, publickeytoken=null'.]    system.web.httpapplicationfactory.ensureappstartcalledforintegratedmode(httpcontext context, httpapplication app) +12864365    system.web.httpapplication.registereventsubscriptionswithiis(intptr appcontext, httpcontext context, methodinfo[] handlers) +175    system.web.httpapplication.initspecial(httpapplicationstate state, methodinfo[] handlers, intptr appcontext, httpcontext context) +304    system.web.httpapplicationfactory.getspecialapplicationinstance(intptr appcontext, httpcontext context) +404    system.web.hosting.pipelineruntime.initializeapplication(intptr appcontext) +475  [httpexception (0x80004005): not load type 'project.bll.mappers.v1.automapperconfiguration' assembly 'project.bll, version=1.0.0.0, culture=neutral, publickeytoken=null'.]    system.web.httpruntime.firstrequestinit(httpcontext context) +12881108    system.web.httpruntime.ensurefirstrequestinit(httpcontext context) +159    system.web.httpruntime.processrequestnotificationprivate(iis7workerrequest wr, httpcontext context) +12722297 

check project configuration , make sure both projects target same framework , platform (eg. cpu)


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -