strong-name - framework 1.1 and framework 2.0



Hi guys,

I have an application that is a and uses some dlls.
This dlls are signed with a strong-name key.

When I sign a dll using framework 1.1 and a file.snk I get a key XXX.
And when I sign dll using framwork 2.0 and the same file.snk I get a key ZZZ.
(command to get a key from dll: sn -T file.dll)
Why does it happen ? Should I not see the same key ?




Yuan Ren[MSFT]

Hi Wrampazo,

Welcome to MSDN newsgroup!

Based on my understanding, the current problem is getting public token of
the same assembly is difference between VS.NET 2003 and VS.NET 2005. If I
have any misunderstood, please let me know.

I have performed some testing under current scenario. But I can not repro
the problem. Below are some steps of the testing:
1 Creating a simple c sharp file;
2 Generating a key file under VS.NET 2003 command prompt:
sn -k mykey.snk
3 Compile the c sharp file with current key file;
4 Using "sn -T xxx.dll" under VS.NET 2003 command prompt, get the public
token as below:
5 Using "sn -T xxx.dll" under VS.NET 2005 command prompt, also get the
public token as below:

For the current stage, I suggest you do the same test and to check whether
the problem still occurred. It'll help me to narrow down the current
problem. Thanks for your understanding! I'm looking forward your reply!


Yuan Ren [MSFT]
Microsoft Online Support


Hi Yaun !!!

Thank you for your attention.
You are right. But the difference between you test and my situation is...

1. I have a public key generated in VS.2003 command prompt.
2. I have a dll compiled and signed using VS.2003
3. I have the same dll, but compiled and signed using VS.2005
4. Both dlls were signed using the same public key file generated at number 1.

5. When I try use "sn -T vs2003.dll" then I get 73c78ce85bee71d0
6. When I try use "sn -T vs2005.dll" then I get 242b2b91ab48e316

Is it normal ?

Wellington Rampazo.



Yuan Ren[MSFT]

Hi Wellington,

Thanks for your reply!

From your description, I have performed the test again. I think current
scenario seems unexpected, because the public token has unique value of the
key file. Since the algorithm is the same, and you are using the same
strong name key file. Whatever version of VS.NET or assemblies you are
using, the result public key token will always be the same.

For the current stage, I suggest you send your projects to me so that I can
repro it. My alias is (e-mail address removed) (remove .online). Please
use zip format.

Thanks for your understanding. I'm looking forward your reply!

Merry Christmas and Happy New Year!

Yuan Ren [MSFT]
Microsoft Online Support

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads