473,799 Members | 3,390 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question on adding an assembly to GAC

Hello All,

I am trying to add an assembly to GAC but having difficult time figuring out
the concept of GAC. This is what I am trying to do....

1. Installed NUnit framework whose DLL ("nunit.framewo rk.dll") I need to add
to the GAC so that I can use it from multiple applications.

2. Used the command "sn" to make sure that the assembly is strongly named.

3. Used the command "GACUtil" to register the assembly in GAC.

Now when I expand the "References " node for my web application I do not see
the newly GAC'ed assembly. Does any one know why?

I thought that once I GAC'ed an assembly I do not have to add the reference
to it again. Am I wrong? Do I need to again add the reference to that dll
from the "Reference" node?

Thanks for your help!!
Mar 26 '06 #1
1 1239
Diffident,
Strong naming an assembly must be done at compile - time by including the
correct directives in the assemblyInfo.cs file, including the path to the
strong name key file.

Just creating a key file doesn't make your assembly strong-named.
(The NUnit DLL may already have a strong name, you'll have to check).

Once you get this installed in the GAC, you still won't be able to find it
for "any project" unless it's added to the macnine.config file so it appears
in your References TAB list.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Diffident" wrote:
Hello All,

I am trying to add an assembly to GAC but having difficult time figuring out
the concept of GAC. This is what I am trying to do....

1. Installed NUnit framework whose DLL ("nunit.framewo rk.dll") I need to add
to the GAC so that I can use it from multiple applications.

2. Used the command "sn" to make sure that the assembly is strongly named.

3. Used the command "GACUtil" to register the assembly in GAC.

Now when I expand the "References " node for my web application I do not see
the newly GAC'ed assembly. Does any one know why?

I thought that once I GAC'ed an assembly I do not have to add the reference
to it again. Am I wrong? Do I need to again add the reference to that dll
from the "Reference" node?

Thanks for your help!!

Mar 26 '06 #2

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

Similar topics

5
2374
by: Marian | last post by:
Hi, I am totaly novice in .NET and I am studying a book about this. There was mentioned "assembly". I did not understand, how function does it has . I would like to know the exact run of code (intermediate language and so on). Is there any page on internet, which makes me clear? Thanx
18
3801
by: Praveen Ramesh | last post by:
Hi, Is there any way to add the @Assembly reference to the aspx files programmatically from inside a custom control (when it gets dropped on to the page from the toolbox)? I have a custom control - MyControl that implements an interface in another custom assembly - InterfaceAssembly. When MyControl gets dropped on to the page and run, it results in a "InterfaceAssembly not found" exception. I am aware that this can be fixed by...
29
1881
by: Tiraman | last post by:
Hi, I Build my own dll with my own namespace name and i would like to put it in one place but for the project bin folder so all of the projects will be able to use it . i tried to put the dll in this place ----> c:\MyDlls\Test.dll And i wrote in my aspx file the following <%@ Import Namespace="Test.MyClass"%>
1
1393
by: Ray | last post by:
Dear all, Now, I am using Global Assembly Cache to share assembly between server and clients. However, it seems that the server and clients use individual Global Assembly Cache. For example, the assembly is placed in U drive, I have to use the Global Assembly Cache Tool in the client PC to add the assembly to the Global Assembly Cache of the client PC manually. Should I set something in the Global Assembly Cache Tool in the client PC in...
5
2466
by: serge calderara | last post by:
Dear all, I do not see the difference between Referencing an assembliy for use in my project and Register it on a page ? At the end if I want to use assembly functionnality , I need anyway to add a reference no ?
1
3008
by: Andrew S. Giles | last post by:
We just converted our Visual Studio 7.1 development projects to Visual Studio 8.0 (2005). I am working on a form, and I want to add one of the custom controls that we had developed under 7.1 (2003) and stored in its own project. When I attempt to add this control (drag and drop) I get the above error. I am trying to figgure out how to solve this so we can use/look at our code. I tried running the project in question in the VS2005...
3
1996
by: _DS | last post by:
The two obvious methods for ref'ing assemblies are: Add a reference and 'Browse' for the actual DLL OR Add existing project to the solution, then add a ref to 'Project'. 1: I'd like to find out what the latter method is doing. I'm assuming that it makes sure that debug exe gets matched to
0
1978
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in the ini on the client's PC. After the program has ended the control looks in a client side temp folder (specified by the ini file) for an image created by the executed program. If the image is there, then the control moves the file to a public folder...
11
1230
by: Joe | last post by:
Alright after much researching, I've come to the conclusion that I need to post this here hoping to get a solid answer. I'm looking to create a DLL that is capable of being used on all platforms that I mentioned in my subject (1.1 framework, 2.0 framework, old ASP) I'm hoping to be able to create this DLL via a 2.0 .net class library. Once its created I want the ability to reference this DLL along with all its methods and properties in...
8
19942
by: Jason | last post by:
Hello, I am trying to utilitze the AJAX Control toolkit in my asp.net project. I have added a reference to AjaxControlToolkit.dll, and in my page, added these lines of code: <ajaxToolkit:ToolkitScriptManager runat="Server" EnableScriptGlobalization="true" EnableScriptLocalization="true" ID="ScriptManager1" />
0
9687
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
10488
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10029
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
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
7567
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
6808
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
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4144
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
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.