Vista, Windows 7 and Windows 8 x64 “Strong name validation failed”

Posted on Updated on

 

I’ve recently installed Vista 64 (and same happened with Windows 7 and Windows 8) in my development machine and everything seems to work quite well (The only thing that doesn’t work is the application I’m developing that I have to run in a VM).

When you work with signed dlls (delay signed) you can end up with a problem of strong name validation error.

Could not load file or assembly ‘[file], Version=2.0.0.0, Culture=neutral, PublicKeyToken=[token]’ or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

The solution is running opening a Visual Studio Command Prompt and run sn.exe –Vr *

This works well in 32 bits but in 64, ONLY! seems to work. To do the same in Windows 64 bit you need to run “C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sn.exe” –Vr *

Windows 7/8 and new versions of .net use: “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin”, “C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools”

I had problems to make it work the first time even after running that. For whatever reason it only worked when I run it with VS closed. Just in case I run the 32bits version as well and I cleaned up the solution that had the problems and Rebuilt it. After that it seemed to work well,

I Know that you don’t probably need to do that but until I did it it didn’t work for me.

 

Roberto.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s