c# - Could not load file or assembly ' Version=3.0.1.0, PublicKeyToken=null or one of its dependencies.A strongly-named assembly is required. -
in application after giving assemblies strong key names including third parties dlls vs 2012 command prompt assembly loading error.
could not load file or assembly ', version=3.0.1.0, culture=neutral, publickeytoken=null' or 1 of dependencies. strongly-named assembly required. (exception hresult: 0x80131044) fileloadexception: not load file or assembly 'clubstarterkit.core, version=3.0.1.0, culture=neutral, publickeytoken=null' or 1 of dependencies. strongly-named assembly required. (exception hresult: 0x80131044)] system.signature.getsignature(void* pcorsig, int32 ccorsig, runtimefieldhandleinternal fieldhandle, iruntimemethodinfo methodhandle, runtimetype declaringtype) +0 `system.reflection.runtimemethodinfo.get_returntype() +42 `system.web.httpapplicationfactory.reflectonmethodinfoifitlookslikeeventhandler(methodinfo m) +19` system.web.httpapplicationfactory.reflectonapplicationtype() +374 system.web.httpapplicationfactory.compileapplication() +143` system.web.httpapplicationfactory.ensureinited() +80 system.web.httpapplicationfactory.setupfilechangenotifications() +67 system.web.compilation.buildmanager.compileglobalasax() +57 system.web.compilation.buildmanager.ensuretoplevelfilescompiled() +269` [httpexception (0x80004005): not load file or assembly 'clubstarterkit.core, version=3.0.1.0, culture=neutral, publickeytoken=null' or 1 of dependencies. strongly-named assembly required. (exception hresult: 0x80131044)] system.web.compilation.buildmanager.reporttoplevelcompilationexception() +62 system.web.compilation.buildmanager.ensuretoplevelfilescompiled() +427 system.web.compilation.buildmanager.callappinitializemethod() +31 system.web.hosting.hostingenvironment.initialize(applicationmanager appmanager, iapplicationhost apphost, iconfigmappathfactory configmappathfactory, hostingenvironmentparameters hostingparameters, policylevel policylevel, exception appdomaincreationexception) +530 [httpexception (0x80004005): not load file or assembly 'clubstarterkit.core, version=3.0.1.0, culture=neutral, publickeytoken=null' or 1 of dependencies. strongly-named assembly required. (exception hresult: 0x80131044)] system.web.httpruntime.firstrequestinit(httpcontext context) +9873912 system.web.httpruntime.ensurefirstrequestinit(httpcontext context) +101 system.web.httpruntime.processrequestinternal(httpworkerrequest wr) +456
i have removed bin , obj folder solution , rebuild , batch build including cleaned solution changed assembly version , still not able find exact error.
what listed above jumbled mess. however, had error last week in luck. in order strong name work need to
- create key
- add key assembly file
- in projects properties add signature
thats it! of info on how right here http://www.codeproject.com/articles/7859/building-com-objects-in-c
in order com object exposed, class library assembly must have strong name. create strong name, use utility sn.exe.
collapse | copy code sn -k database_com_key.snk open assemblyinfo.cs , modify line:
collapse | copy code [assembly: assemblykeyfile("database_com_key.snk")] build object. build results type library can imported managed or unmanaged code.
also can refer question here on stack.
and
Comments
Post a Comment