473,776 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2006
> 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:Assem blyKeyFileAttri bute("MyAssembl yName.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.in fovis.co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP14.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.in fovis.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
2283
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
1031
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
1460
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 public key token that controls whether the assembly is the right one. Changing the version number did not have any affect.
1
1455
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 access the methods contained within the assembly. As this assembly will effectively access the database then I need to provide some security to stop unwanted access.
6
1655
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 folders an this works correctly. We want to have this shared code in the GAC.
2
1353
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
1699
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 measure: we could then indicate that any assemblies we signed are fully trusted, and so deploy centrally rather than having to deploy on each server. However, we still want to deploy by copying each app to a separate deployment directory, rather...
8
2697
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 dll into a console application (f.x StrongConsoleApp.exe) and run it if I have somehow specified the public part of the strong key and not otherwise.
1
2845
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. Can I use a strong named DLL outside the GAC with Copy Local = false by providing a reference to the public key? If yes to above, please tell me how to reference the public key within
6
5684
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 since I've installed so many versions of Visual Studio) RL http://msdn.microsoft.com/en-us/library/h4fa028b.aspx Deployment in Visual Studio
0
9627
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9462
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8951
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7469
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6721
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5367
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4030
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2859
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.