473,787 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Updating GAC-based Assemblies: How to handle versioning?

I've built a core set of assemblies that are shared by multiple ASP.NET web
applications on a production server. These assemblies are updated quite
frequently, as I am continually adding to and improving the core
functionality of my applications.

Up until now, I've used a batch script to copy updated assembly versions to
the \bin directory for each application. However, given that all
applications always use the latest version of the assemblies, the GAC is a
perfect place to locate them rather than an identical copy of each assembly
in every applications \bin.

My problem is how to handle the versioning so that updating the assemblies
(which could happen as often as daily) is a simple operation. Ideally, I
would copy the assemblies to the production server and run a batch file to
install them in the GAC.

My questions become:

If I don't change the version numbers each time (i.e. the version number is
always 2.0.0.0), will the applications pick up the new version automatically?
Right now, that doesn't appear to be the case.

If I do change the version number, then I have to change the root web.config
file every time, maintain a publisher policy, or update the binding policy
every time, none of which I want to do.

What is the best solution here?
Oct 19 '06 #1
1 1607
You ahve to set up a policy for GAC objects. Even if you are compiling same
culture and same version, the assembly stored will have a different
signature and not automagically be updated. Through policies, like a
publisher policy, you can force an update to the newest version.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** *************** ****
Think outside of the box!
*************** *************** *************** ****
"Hone" <Ho**@discussio ns.microsoft.co mwrote in message
news:C7******** *************** ***********@mic rosoft.com...
I've built a core set of assemblies that are shared by multiple ASP.NET
web
applications on a production server. These assemblies are updated quite
frequently, as I am continually adding to and improving the core
functionality of my applications.

Up until now, I've used a batch script to copy updated assembly versions
to
the \bin directory for each application. However, given that all
applications always use the latest version of the assemblies, the GAC is a
perfect place to locate them rather than an identical copy of each
assembly
in every applications \bin.

My problem is how to handle the versioning so that updating the assemblies
(which could happen as often as daily) is a simple operation. Ideally, I
would copy the assemblies to the production server and run a batch file to
install them in the GAC.

My questions become:

If I don't change the version numbers each time (i.e. the version number
is
always 2.0.0.0), will the applications pick up the new version
automatically?
Right now, that doesn't appear to be the case.

If I do change the version number, then I have to change the root
web.config
file every time, maintain a publisher policy, or update the binding policy
every time, none of which I want to do.

What is the best solution here?


Oct 19 '06 #2

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

Similar topics

0
1724
by: some guy with a computer | last post by:
I can not get a custom httpHandler to fire using machine.config and an assembly in the GAC. It will not work if I move the assembly to the GAC, even though I have it referenced correctly and add the assembly to the <compile> tag (all my other controls I can call from the GAC this way). It will not work if I have the handler specified where the rest are (*.cs, *.aspx.....etc, in machine.config)
0
275
by: Doug | last post by:
Hi, We are having an issue with policy files and the GAC. We have built a process where it will take a policy file dll and install it into the GAC. But a couple of things are occurring. One - it seems like that if someone is referencing an older version of that policy file that is in the gac (thus placing a lock on it we think), we can't get the new version installed into the GAC. Is there a way to get around this problem?
3
346
by: Scott Vercuski | last post by:
Everyone, I've run into a problem using the GAC. I've created a DLL and put it in the GAC on our server. I've also created a webpage and referenced that same DLL with the "Copy Local" set to false. I run the page and things do what they're supposed to do. When I make a change to the DLL and upload it. I can't get the website to reference the new DLL. I've tried recompiling, removing from the GAC, etc. ... everything I can think of...
2
265
by: julien | last post by:
Hello, I read several articles about the GAC. Here is my understanding The GAC has 2 main purposes: a/ avoid having the same shared dll loaded several times by different programs b/ several versions of a dll can run in parallel. It is also easy to update the version of a dll in a GAC without rebuilding the applications that depend on it
2
1126
by: julien | last post by:
Hello, I have one 2 more questions about the GAC: 1/If I had a dll to be shared in the GAC directory, will it be loaded when a program will try to find it? Or do I have to load it manually using the command line tool? 2/If I change the config file to change the version mapping, will it be automatically reflected by the GAC, or do I have to manually unload all libraries and load them back? Thank you
7
2331
by: Ludwig | last post by:
Hi, Current situation: a number of C++ applications installed on multiple computers, some of them are dependent of each other. Updates are installed manually. Question: automate these installations; using C# and .NET framework. Problem is that I don't know enough on how c++ apps are installed and can be updated. In .NET it's as easy as copying files or installing in
1
1239
by: Diffident | last post by:
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.framework.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.
4
1420
by: Sridhar | last post by:
Hi, I have a question regarding the Global Assembly Cache (GAC) and Source Safe. We have some common dlls which we would like to put in GAC so that they can be used in different applications. We are using Source Safe as a Version Control. Let's say I have created a data access library( one of common dll) and put in the source safe. I have created one web application which needs to access this data access dll. Can I put this data access...
1
2370
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been installed into the GAC. We originally had this assembly without a strong-name and we were successfully using it by referencing it when it was NOT in the GAC. The assembly was built using the 1.0 framework and we were able to call it from both 1.0...
0
784
by: strattonn | last post by:
I am trying to use a class I created in a SQL SSIS Script Object to do this I need to save it in the GAC. I created a strong name and copied it on the server to the assembly directory. Then I needed to update the class. I uninstalled it from the GAC and put the new one in. The problem is in the list of References for the script object I only see my first version. The later version that shows up in the GAC viewer does not update inside VS when...
0
9655
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
10363
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
10110
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
8993
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...
0
5398
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
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
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
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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.