Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strong Name Validation Failed

People also ask

How do I turn off strong name verification?

Disable the strong-name bypass feature for all applications On 64-bit computers, in the system registry, create a DWORD entry with a value of 0 named AllowStrongNameBypass under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\. NETFramework and HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\. NETFramework keys.

What is strong name verification?

A strong name consists of the assembly's identity, simple text name, version number, and culture information (if provided)—plus a public key and a digital signature. Strong names serve to identify the author of the code.

Does not have a strong name referenced assembly?

For me, the problem was a NuGet package without a strong name. The solution was to install StrongNamer from NuGet, which automatically adds a strong name to all referenced assemblies. Just simply having it referenced in the project fixed my issue.


Open the command prompt as administrator and enter following commands:

reg DELETE "HKLM\Software\Microsoft\StrongName\Verification" /f
reg ADD "HKLM\Software\Microsoft\StrongName\Verification\*,*" /f
reg DELETE "HKLM\Software\Wow6432Node\Microsoft\StrongName\Verification" /f
reg ADD "HKLM\Software\Wow6432Node\Microsoft\StrongName\Verification\*,*" /f

Open the command prompt as administrator and enter the following command:

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sn.exe" -Vr <dllpath>

Pay attention that the argument are case sensitive. Source with more details: http://blogs.msdn.com/b/keithmg/archive/2012/03/20/strong-name-validation-failed-exception-from-hresult-0x8013141a.aspx


You must use the 64-bit version of sn.exe on a 64-bit machine. (C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sn.exe)


Is the one the code runs on a "development" machine where you might have run "sn.exe -Vr AssemblyName.dll" at some stage which would allow you to use a delay signed assembly as if it were fully signed. When you transfer the delay signed assembly to another machine and run it, it will fail strong name validation because it is not fully signed.