473,387 Members | 1,520 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,387 software developers and data experts.

Strong naming

Hi

I have a class project which generates a dll which I would like to install
in the gac. When I build the project, I get the following error;

Unable to build assembly XXX into the Global Assembly Cache; the assembly is
not strongly named.

What do I need to do to get the assembly strongly named?

Thanks

Regards

Nov 21 '05 #1
3 1990
> What do I need to do to get the assembly strongly named?

Any assembly that you want to put into the GAC is required to have a "Strong
Name". Here's how to do it:
In your Visual Studio .NET -> Tools program group launch a Visual Studio
..NET 2003 Command Prompt. Then do this to see the command syntax:

sn /?

To generate a Strong Name Key, do this:

sn -k MyAssemblyName.snk

Then put that file in your project directory (where your source code is)

Then open up your project's AssemblyInfo file and add this:

<Assembly:AssemblyKeyFileAttribute("MyAssemblyName .snk")>

(You may have to monkey around with the relative path of the filename inside
the attribute.)

In MSDN Library, goto the index tab and goto "strong-named assemblies"
--
Peace & happy computing,

Mike Labosh, MCSD

"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this new system SUCKS."
-- General Barringer, "War Games"
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi

I have a class project which generates a dll which I would like to install
in the gac. When I build the project, I get the following error;

Unable to build assembly XXX into the Global Assembly Cache; the assembly
is not strongly named.
Thanks

Regards

Nov 21 '05 #2
I think this is what you really need:

http://support.microsoft.com/default...b;en-us;315682

http://support.microsoft.com/default...b;en-us;324168

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #3
"John" <Jo**@nospam.infovis.co.uk> schrieb
Hi

I have a class project which generates a dll which I would like to
install in the gac. When I build the project, I get the following
error;

Unable to build assembly XXX into the Global Assembly Cache; the
assembly is not strongly named.

What do I need to do to get the assembly strongly named?


http://msdn.microsoft.com/library/en...assemblies.asp
Armin

Nov 21 '05 #4

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

Similar topics

8
by: Ted | last post by:
What are the negatives to strongly naming assemblies? Why wouldn't we want to strongly name all assemblies that we ship as part of our products? Thanks Ted
0
by: Vijay Sarathi Reddy.G | last post by:
Actually CLR maintaings Strong type naming.What is strong type naming and how CLR maintains Strong type naming? Thanks...
1
by: Jason | last post by:
I've been experiementing with Assembly.Load..CreateInstance and strong naming the assemblies. This has given me a few questions, 1. Does the version number matter? I've found that its the...
1
by: Jimski | last post by:
Hi all, I am creating an assembly that will access a database to return record details. I need to deploy it to a 3rd Party and they will then be able to use the assembly in their code to...
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...
2
by: SStory | last post by:
How can I strong name my assembly if it references 3rd part non-strong named dlls? I just want my part strong named--I don't care about their part. Thanks, Shane
7
by: Bruce Wood | last post by:
I still haven't gotten through the .NET Framework Security tome on my desk. Maybe the folks here can answer a burning question. I want to use strong naming at our organization as a security...
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...
1
by: Tom | last post by:
My unsigned DLL works in my project that references it as long as I set Copy Local = true. Now I have signed the DLL with the sn.exe generated keys but have not yet moved the DLL into the GAC. ...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.