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

Strongly-named assemblies not in GAC

What happens when a strongly-named assembly is not in the global
assembly cache (GAC) but is installed in two application's bin
directories (with each copy being identical in every way - the exact
same version, public key, culture information, etc.)?

I understand the benefits of deploying shared assemblies with each
application instead of using the GAC but is increased memory usage a
disadvantage of this approach? For example, suppose that the first
application is running and the shared assembly is in memory. If the
second application is started and needs the same shared assembly is it
loaded in memory a second time?

Kyle Blaney
Jul 21 '05 #1
2 1881
Yes. It is loaded a second time. IN reality, unless you are using static
methods (helper methods), you end up consuming memory whether in the GAC or
shared. You can create an assembly that loads into COM+ to pool objects, if
that is your goal, but I would not advise it.

Too many people are worried about memory usage, which is probably a leftover
from the COM days, when you had to worry. The GC handles memory rather
nicely, even if it does seem to allow .NET to consume too much. As
everything performs nicely, I would not be overly worried.

Back to the question. Strong-naming, outside of the GAC, simply means you
have a strong name. Two apps, using the same code base, will instantiate
objects from assemblies in their own apps; they do not share.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Kyle Blaney" <ab****@hotmail.com> wrote in message
news:a9**************************@posting.google.c om...
What happens when a strongly-named assembly is not in the global
assembly cache (GAC) but is installed in two application's bin
directories (with each copy being identical in every way - the exact
same version, public key, culture information, etc.)?

I understand the benefits of deploying shared assemblies with each
application instead of using the GAC but is increased memory usage a
disadvantage of this approach? For example, suppose that the first
application is running and the shared assembly is in memory. If the
second application is started and needs the same shared assembly is it
loaded in memory a second time?

Kyle Blaney

Jul 21 '05 #2
Greg,

Thank you for your reply. Let me make sure I understand what you're
saying.

Even though I shouldn't really be worried about memory usage, it's
exactly the same whether I put the assembly in the GAC or copy it to
each application's directory. If that's the case, what is the
advantage of using the GAC?

The only advantage I can see is one of maintenance. If I ever have to
provide a new version of the assembly I only have to deploy a single
copy. However, even that is a stretch because I have to update each
application's config file (if I don't use publisher policy) to ensure
they use the new version of the assembly.

Kyle Blaney
Jul 21 '05 #3

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

Similar topics

4
by: Bill Cohagan | last post by:
I'm trying to figure out the "best" way to implement a strongly typed ArrayList. Using inheritance is one approach. It has the advantage that I only have to write overrides for the Add method and...
2
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is...
1
by: Job Lot | last post by:
I am confused how strongly typed dataset is different from un-typed dataset. Is there any good link explaining pros and cons of both? Which one should be used preferably?
2
by: Mark | last post by:
Just wanted to confirm that my understanding of a strongly typed language is correct: 1. .NET is a strongly typed language because each variable / field must be declared a specific type (String,...
2
by: David | last post by:
I have been developing applications with Java for quite a while but I am new to .NET development. I am trying to learn the ".NET way" of creating Strongly Typed Objects from a database. The...
1
by: HardBap | last post by:
I've created a strongly typed DataSet (Customers.xsd) using the xsd.exe tool. I want to be able to access fields using ds.Customer.CompanyName. The problem is when I return this DataSet from a...
2
by: Ian Gore | last post by:
Hi, I'm relatively new to VB.NET so I'd be grateful if someone could point out what I don't understand here... 1) Creating a strongly typed collection by inheriting CollectionBase. This is...
20
by: Dennis | last post by:
I use the following code for a strongly typed arraylist and it works great. However, I was wondering if this is the proper way to do it. I realize that if I want to implement sorting of the...
1
by: Code Monkey | last post by:
Silly question maybe, but I've been doing the following for far too long now: public static DataTable myDataTable() { string sql = @"SELECT column1, column2, column3, column4 FROM...
4
by: Rachana | last post by:
Hi, I have understood Data Sets but what is meant by typed/untyped/ strongly typed datasets. Can any one explain me or suggest any site/ article, to get these concepts (and their ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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
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...

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.