473,396 Members | 2,115 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,396 software developers and data experts.

Proper use of the GAC and referencing old versions of a DLL

Everyone,

I have a question about the proper use of the GAC and how to
reference past versions of a DLL. Let me lay out the scenario ...

Suppose we have a DLL named GACTest.dll ...

Version 1 has a function Add(int a, int b) ... just adds the two
numbers and returns the result. I've registered that in the GAC and
gave it the version number 1.0.0.0. I installed the DLL in
C:\WINNT\Microsoft.NET\Framework\v1.1.4322

I created a test page and called the Add function with 2 intgers
and everything works fine.

Now I go back in and change the Add function to ... Add(int a, int
b, int c). I change the version number to 1.1.0.0, recompile and put
it in the same directory (C:\WINNT\Microsoft.NET\Framework\v1.1.4322)
and re-register it in the GAC. When I look in the GAC I see two
versions of the DLL as I expected to ... one is version 1.0.0.0 and
the other is 1.1.0.0 and in my code when I call the Add function and
supply 3 parameters ... it works fine ... but how would I reference
the OLD version? if I only wanted to call the Add function with two
parameters? How do I reference 1.0.0.0?

Thank you in advance for any help
If you would like to contact me please do so at
sv*******@parker.com

Thank you,
Scott Vercuski
sv*******@parker.com
Jul 21 '05 #1
2 1688
Scott,
I installed the DLL in C:\WINNT\Microsoft.NET\Framework\v1.1.4322
Why? That directory is primarily for framework assemblies.

but how would I reference
the OLD version? if I only wanted to call the Add function with two
parameters? How do I reference 1.0.0.0?


Keep a copy of it in some directory, and don't overwrite it with
v1.1.0.0. Browse to it from VS.NET's Add Reference dialog.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #2
Scott,
I installed the DLL in C:\WINNT\Microsoft.NET\Framework\v1.1.4322
Why? That directory is primarily for framework assemblies.

but how would I reference
the OLD version? if I only wanted to call the Add function with two
parameters? How do I reference 1.0.0.0?


Keep a copy of it in some directory, and don't overwrite it with
v1.1.0.0. Browse to it from VS.NET's Add Reference dialog.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #3

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

Similar topics

2
by: Simon | last post by:
Am using the following code. <script language="JavaScript1.2"> function setquantity(productindex,productquantity) { //create the reference object irefname_none = eval("document." +...
5
by: DKode | last post by:
I have created an application that will be used for my IT depts. Tasks. I believe I have created the correct architecture but it doesn't feel correct. Could I get opionions if I am headed in the...
1
by: Scott Vercuski | last post by:
Everyone, I have a question about the proper use of the GAC and how to reference past versions of a DLL. Let me lay out the scenario ... Suppose we have a DLL named GACTest.dll ... Version...
14
by: Xah Lee | last post by:
if i want to have a empty link, which way is more proper? <a href=""> <a href="#"> <a href="javascript:void(0);"> Xah xah@xahlee.org ∑ http://xahlee.org/
0
by: dba123 | last post by:
I need to "tie together the cookie with the domain" by referencing the information from my web.config below in my login's codebhind. I don't understand how. I need to also save that after...
7
by: Wiebe Tijsma | last post by:
Hi, I'm running a web application application using the Microsoft.Interop.Security.AzRoles version 1.2.0.0 in the GAC. After an upgrade to Vista, I also have a version 2.0.0.0 in the GAC. I...
5
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
I am experiencing a lot of speed issues on initial app loads where we are referencing 3rd party 1.1 assemblies from 2.0 code. Those 1.1 assemblies reference things like System.Windows.Forms...
1
by: Dave Anson | last post by:
What is the recommended practice for referencing assemblies in a project from other solutions? I am using Visual Studio 2005 Team System. I have several assemblies in another solution which will...
3
by: =?Utf-8?B?a3lvbmc=?= | last post by:
Quick question. Say I have a project against the 2.0framework. I also have a dll compiled against 3.5. If I reference the 3.5 dll in the 2.0 project, how would that work? So I'm thinking that...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...
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
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,...

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.