How to disable strong name verification for the entire .Net assembly?

How to disable .Net Strong name confirmation for the entire .NET assembly in the system using the .net framework or IIS configuration or project configuration?

http://nvea.host56.com/up/726daf2c9ee0.png (click to enlarge)

+6
source share
4 answers

Try adding it to the registry :

OS x32:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,af24b530b87e22f1] 

X64 OS:

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,af24b530b87e22f1] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,af24b530b87e22f1] 

and add it to your web.config :

 <system.web> <hostingEnvironment shadowCopyBinAssemblies="false" /> </system.web> 
+7
source

To disable reliable name verification for all assemblies on your computer, you can run:

 sn.exe -Vr * 

from the developer command line for VS201 *

+4
source

This is the exception I received:

 Error Type: System.IO.FileLoadException Error Message: Could not load file or assembly 'MyAssemblyName, Version=5.1.0.0, Culture=neutral, PublicKeyToken=30b439e30eee46b4' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) 

This is a solution that helped me disable strong name checking for a specific assembly when testing it in a fully signed service:

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\MyAssemblyName,30b439e30eee46b4] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\MyAssemblyName,30b439e30eee46b4] 

You need to create these new keys in the registry, the keys have no values ​​under them. You can copy these two lines into a .reg file, change the assembly name and its guid, and double-click it to merge into the registry.

Note: the assembly name is your file name without the .dll extension, exactly as shown in the exception.

Then restart the application / service.

I think the answers above with * instead of the assembly name should also work.

+3
source

The following entries will work:

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,af24b530b87e22f1] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,af24b530b87e22f1] 
+2
source

All Articles