.net - Problems running unit test in Visual Studio -
when run release build of (vs 2008 .net) unit tests, following exception:
system.io.fileloadexception: not load file or assembly 'arcvegaorm, version=1.0.3856.24327, culture=neutral, publickeytoken=0dd85ae1d99ddbee' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040).
i not exception when run debug build tests.
the unit test framework copying old version of 'arcvegaorm' assembly testresults\out folder. not know gets old version - not match version in projects bin\release folder.
i beginning think there bug vs.net unit test framework, , has old version cached.
one thing check gac
(global assembly cache). can opening windows explorer , typing in c:\windows\assembly in address bar (assuming os installed on c drive).
it may getting assembly gac instead.
other things clean solution , rebuild make sure don't have old assembly references.
also, if web application, helps stop iis , go clean out c:\windows\microsoft.net\framework\framework_version\temporary asp.net files
folder.
tip
other thing use .net reflector. can see dependencies assembly has, , need make sure present on target machine.
the way install reflector, run it, drag assembly , can see assembly's dependencies. need make sure every 1 of dependency dll's available on target machine, , also, version number must correct if signed assemblies.
tip2
note issues assembly bound against version xxx of assembly b, , assembly c bound against version yyy of assembly b. in other words, 2 different assemblies in project bound against different versions of same assembly. modern day version of dll hell. way hack around use assembly rebinding. can read here.
Comments
Post a Comment