.net - Why do I get strong name validation failed for assembly? -


why strong name validation failed assembly?

it c++\cli dll. have set use our strong key - same 1 use of our projects.

sn -t example.dll 

gives us

public key token ... (the same token of our dlls )

but when run

sn -vf example.dll 

we get:

failed verify assembly -- strong name validation failed assembly ...  

any ideas of should for? build in visual studio 2013 our strong key name specified in project properties pages.

update - answers questions posed hans:

the key file setup using project's "property pages" in visual studio.

keyfile: $(solutiondir)keys\ivara.snk 

the platform toolset is: visual studio 2013 (v120)

for manifest question - not 100% sure, property pages:

configuration properties -> manifest tool -> command line gives:

/verbose /out:".\x64\debug\oqkern.dll.embed.manifest" /nologo ".\x64\debug\oqkern.dll.embed.manifest.res"

hans' suggestion worked:

i marked dll delay signed , added post build step signing:

sn -r "$(targetpath)" "$(solutiondir)keys\ivara.snk" 

after this:

c:\development\source\dotnet\bin\x64\debug>sn -vf oqkern.dll  microsoft (r) .net framework strong name utility  version 4.0.30319.33440 copyright (c) microsoft corporation.  rights reserved.  assembly 'oqkern.dll' valid 


Comments