473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Strong Name Key

Hello Everyone
Have nice day!!!

Please explain Strong Name key in very simple way with example and
How to create it?

Paul

Mar 4 '07 #1
3 4879
Because your assembly name (foo.dll) may not be unique in the universe
(what's to stop me from making an assembly called "foo.dll"?), there are
times when you want to give it a strong name (for example, when you want to
install your assembly into the GAC).

This strong name consists of a public and private key and is used to
uniquely identify an assembly on your system.

You give your assembly a strong name by doing to the following:

1. Using the sn.exe tool provided with VS.NET, at a command line, you type:
sn.exe -k fullPathToTheNewKeyFileYouAreCreating
(ie. sn.exe -k c:\myKeyFile.snk)

After this a new key file will have been created. This key file has public
& private key information in it. You now need to associate that info. with
your assembly.

2. You open the AssemblyInfo.cs/.vb file and add a new entry
<Assembly:AssemblyKeyFileAttribute("sgKey.snk")>

Now, you recompile and your assembly will have a strong name associated with
it.

See: http://msdn2.microsoft.com/en-us/lib...ad(VS.80).aspx and
related links at bottom of article for more info.

<sp********@yahoo.co.inwrote in message
news:11********************@t69g2000cwt.googlegrou ps.com...
Hello Everyone
Have nice day!!!

Please explain Strong Name key in very simple way with example and
How to create it?

Paul

Mar 4 '07 #2
On Mar 5, 12:04 am, "Scott M." <s...@nospam.nospamwrote:
Because your assembly name (foo.dll) may not be unique in the universe
(what's to stop me from making an assembly called "foo.dll"?), there are
times when you want to give it a strong name (for example, when you want to
install your assembly into the GAC).

This strong name consists of a public and private key and is used to
uniquely identify an assembly on your system.

You give your assembly a strong name by doing to the following:

1. Using the sn.exe tool provided with VS.NET, at a command line, you type:
sn.exe -k fullPathToTheNewKeyFileYouAreCreating
(ie. sn.exe -k c:\myKeyFile.snk)

After this a new key file will have been created. This key file has public
& private key information in it. You now need to associate that info. with
your assembly.

2. You open the AssemblyInfo.cs/.vb file and add a new entry
<Assembly:AssemblyKeyFileAttribute("sgKey.snk")>

Now, you recompile and your assembly will have a strong name associated with
it.

See: http://msdn2.microsoft.com/en-us/lib...VS.80).aspxand
related links at bottom of article for more info.

<spaulsa...@yahoo.co.inwrote in message

news:11********************@t69g2000cwt.googlegrou ps.com...
Hello Everyone
Have nice day!!!
Please explain Strong Name key in very simple way with example and
How to create it?
Paul- Hide quoted text -

- Show quoted text -
Thank you sir

Mar 5 '07 #3
On Mar 4, 7:53 pm, spaulsa...@yahoo.co.in wrote:
Hello Everyone
Have nice day!!!

Please explain Strong Name key in very simple way with example and
How to create it?

Paul
Hi Paul,

I had some problems with strong names some time ago and asked lots of
strange questions about it. A friendly MVP took the time and explained
a lot to me. You can see the post here:
http://groups.google.com/group/micro...208c7d28892c49

Best wishes,
Per

--

Per Erik Strandberg
Encrypt files: www.txet.org
Mar 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mário Sobral | last post by:
Hi, I created an assembly (let's call it assembly (B)) that returns a localized resource for a given key (similar to System.Globalization.ResourceManager). I checks if the caller assembly (let's...
10
by: Tony Jones | last post by:
Can anyone think of a reason why a 3rd party vendor writing .NET components would NOT strong name their assemblies? What harm does adding a strong-name to assembly present - I would think none...
1
by: John E. | last post by:
How can I compile two projects with a circular reference while giving them a strong name? There is a project that we have that has two components that reference each other e.g. A<->B thus...
20
by: Razzie | last post by:
Hey all, I'm really going through a small hell right now - I've completely lost it :) I made a project, using two interop libraries from exchange (created them as in this msdn article:...
6
by: Manuel Lopez | last post by:
Hello, I have a Web Project (UserControls.dll) with some user controls that is shared by many asp.net web applicattions. What we do is copy UserControls.dll to all the applications bin...
5
by: Gopal Krish | last post by:
Hello, Can anyone tell me how to strong name a web page? Thanks Gopal
10
by: Chubbly Geezer | last post by:
I have been working on a VB 2005 DLL which has previously been working. I would create the DLL (reporting.dll), install it, run 'gacutil' and 'regasm' and my Access 2000 DB could see it and use...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
8
by: per9000 | last post by:
Dear readers, I have some problems with strong keys. What I want to do is basically this. A - create an application (f.x. strongHello.dll) with a strong key. B - import the functions of this...
6
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.