Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
If you come across this error:
{"Could not load file or assembly 'TheAssemblyYouHaveReferenced' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)":"TheAssemblyYouHaveReferenced'}
And you meet the following criteria
You can create a "MyDisableRegistryFile.reg" file with something like below:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,58845dcd9090cc91]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,58845dcd9090cc91]
Where 58845dcd9090cc91(Fictious Value :-)) is the PublicKeyToken. If you create this file you can run it on each deployment or machine as part of your install process.
It should be pointed out that disabling SN verification isnt very secure but you may have your own reasons.
Also beaware your dll thats causing the error may have referenced other dlls that may have the same problem, so you may have to do this multiple times.
Quick fix use C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sn.exe if on X64 and combine with -Vr <dllpath> if you want to disable verification too(-Vr is case sensitive). This is basically because sn.exe is 32bit and always returns success even in failure.
If you dont have the SDK installed for SN then get it here: https://www.microsoft.com/en-us/download/details.aspx?id=8279
This blog has some more information too -> https://blogs.msdn.com/b/shitals/archive/2008/05/01/8446582.aspx
Anonymous
October 01, 2012
The link to Connect above is dead now, was this bug archived? I cannot find it - the details might help resolve this issue (which I now have, too)
Anonymous
October 01, 2012
The comment has been removed
Anonymous
April 30, 2013
also you can use: sn.exe -Vr "dll path"
Anonymous
October 08, 2015
Thanks. You saved the developer day!
Please sign in to use this experience.
Sign in