473,320 Members | 1,828 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,320 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 1685
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.