473,774 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Global Assembly Cache - question

Hi

In my solution I have two projects.
First is Library project.
The second project uses this library ( dll ).
I am registering this assembly in global assembly cache ( by .net
configuration tool ).
Key pair is generated for the assembly using VS2005 ( I also use VS to
sign my assembly using this keypair ) Everything works fine.
I am adding reference to created dll, on the second project.

Then I need to add some code and rebuild my DLL by right-clicking
first project/build.
I have observed that changes are visible for the second project only
when I register assembly to GAC again.
Why is that?

Kind Regards
Piotr Kołodziej
Jun 27 '08 #1
6 2748
Piotrekk wrote:
....
The second project uses this library ( dll ).
I am registering this assembly in global assembly cache ( by .net
configuration tool ).
Then I need to add some code and rebuild my DLL by right-clicking
first project/build.
I have observed that changes are visible for the second project only
when I register assembly to GAC again.
Why is that?

You don't need to register the Library in the GAC and you probably
shouldn't.

Just remove it from the GAC and re-refernce it from the other Project
using the 'Projects in Solution' tab. Developmont will be seemless.

If you really want the assembly in the GAC you can do that on deployment.

-HH-


Jun 27 '08 #2
This doesn't answer my question at all. I need this dll to be in GAC
and I have problem of different kind.
Jun 27 '08 #3
Piotrekk wrote:
This doesn't answer my question at all. I need this dll to be in GAC
and I have problem of different kind.
Do you really need the assembly to be in the GAC _during_ development?
In that case the behaviour you see is normal... Maybe you can
re-register it each build using a build event.
-HH-
Jun 27 '08 #4
Why is that normal?I cannot understand why do I need to register it
after each build. GAC holds assembly information which doesn't change
when assembly is rebuilded.

PK
Jun 27 '08 #5
Piotrekk wrote:
Why is that normal?I cannot understand why do I need to register it
after each build. GAC holds assembly information which doesn't change
when assembly is rebuilded.
The Gac holds a copy of your assembly. (Take a look with anything but
Windows Explorer).

But why do you think this assembly needs to be in the GAC at all? And
why during development?

-HH-


Jun 27 '08 #6
Piotrekk schrieb:
Hi

In my solution I have two projects.
First is Library project.
The second project uses this library ( dll ).
I am registering this assembly in global assembly cache ( by .net
configuration tool ).
Key pair is generated for the assembly using VS2005 ( I also use VS to
sign my assembly using this keypair ) Everything works fine.
I am adding reference to created dll, on the second project.

Then I need to add some code and rebuild my DLL by right-clicking
first project/build.
I have observed that changes are visible for the second project only
when I register assembly to GAC again.
Why is that?

Kind Regards
Piotr Kołodziej
The GAC is a special folder where .NET assemblies are stored. If you
register an assembly in the GAC a copy is stored. Take a look at
c:\windows\asse mly but do not use the standard windows explorer. use the
command box instead (or anything else other than windows explorer)
because the explorer contains an add-in that displays the GAC
differently from how the files are actually stored.

The GAC should be used only for assemblies that are used for multiple
programs (e.g. framework, loggers etc). Usually it is not necessary to
put your own assemblies in the GAC. However, you should still sign them.

If you use the assembly in the GAC rather than referencing the DLL in
the project you have to update the GAC with every change. As Henk told
you already, it is better to reference the DLL rather than putting it in
the GAC especially during development.

Alain
Jun 27 '08 #7

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

Similar topics

10
504
by: Simon Wallis | last post by:
I know the general purpose for the GAC is to share a component among many applications. But even when you add something to the GAC, you still have to manually create a reference to the DLL in your project (right?). So what have I gained by adding it to the GAC?
3
1517
by: DDE | last post by:
Hi everybody, I developed an assembly common to all my Web Services, so I registered it and put it in the Global Assembly Cache. Now, I modified this assembly, but cannot succed to have this new assembly used by my Web Services. Whatever I do, the old assembly is still used!! I try to unregister it, put the new version in the assembly cache nothing works. I also repplaced the dll fil in :\WINNT\Microsoft.NET\Framework\v1.1.4322 , same...
1
1324
by: Relaxin | last post by:
I have a library loaded in the Global Assembly Cache (GAC). In my application I use the library by stating: using MyLibrary.MyClass But when I try to compile the code it says that it can't find my library, but it can find it after I add it to the references. My question is how come it can't find it within the GAC, do I always have to add it to the references or is there something else I needed to? Thanks
7
960
by: JerryW | last post by:
I just reinstalled .NET 2003 (after repeated attempts to get ASP.NET Web Applications to work). I first did a complete uninstall of .NET 2003, .NET Framework 1.1, and IIS. I also completely deleted c:\inetpub\wwwroot and rebooted before reinstalling. I created a new virtual directory from within IIS (e.g. MyWebTest). Then I tried to create a new Visual C# ASP.NET Web Application pointing to the location http://localhost/MyWebTest. I get...
11
3141
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some useful utils that more pages on that server can use. As an example, I have created a Page Counter class that opens an Access .mdb file, counts the current entries for that page, and adds a new entry with some information regarding the current...
2
1740
by: George Durzi | last post by:
I have a dll that I use in several projects, that I placed in the Global Assembly Cache. This dll is references in each of my projects. This Dll is referenced by a type= declaration in my web.config as follows. <configSections> <section name="exceptionManagement" type="Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManagerSectio nHandler,Microsoft.ApplicationBlocks.ExceptionManagement" /> </configSections>
41
10678
by: Miguel Dias Moura | last post by:
Hello, I am working on an ASP.NET / VB page and I created a variable "query": Sub Page_Load(sender As Object, e As System.EventArgs) Dim query as String = String.Empty ... query = String.Format("SELECT * FROM dbo.documents WHERE ") & query End Sub
10
3482
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net 2005 created any AssemblyInfo.cs file.
1
1392
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...
0
9621
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
9454
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
10267
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...
1
10040
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
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...
1
7463
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
5355
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...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
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

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.