473,320 Members | 2,048 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.

Assembly version compatibility issue

Bob
I have a common assembly DLL that's installed into GAC (using msi created by
a setup project). It contains classes used by all the applications we have.
This works well but when I increase the version number (say, from 1.0.0 to
1.01), all existing applications have to be recompiled even if the change to
the assembly is to add new classes (that is, no change to existing classes).
I'd think there should be a way to make this version compatible. I have to
increase the version # for the msi to automatically uninstall the older DLL
and install the newer DLL properly when it's deployed.

Could anyone give me any suggestions? My goal is to keep the existing
client application intact (no recompilation) when new features are added to
the common assembly (that is, no change to any existing public interfaces in
the assembly).

Thanks
Bob
Nov 16 '05 #1
2 1926

" Bob" <bo*******@yahoo.com> wrote in message
news:es**************@TK2MSFTNGP10.phx.gbl...
I have a common assembly DLL that's installed into GAC (using msi created by a setup project). It contains classes used by all the applications we have. This works well but when I increase the version number (say, from 1.0.0 to
1.01), all existing applications have to be recompiled even if the change to the assembly is to add new classes (that is, no change to existing classes). I'd think there should be a way to make this version compatible. I have to increase the version # for the msi to automatically uninstall the older DLL and install the newer DLL properly when it's deployed.

Could anyone give me any suggestions? My goal is to keep the existing
client application intact (no recompilation) when new features are added to the common assembly (that is, no change to any existing public interfaces in the assembly).

You need to deploy the new assembly with a publisher policy.

"Vendors of assemblies can state that applications should use a newer
version of an assembly by including a publisher policy file with the
upgraded assembly. The publisher policy file, which is located in the global
assembly cache, contains assembly redirection settings."
-from
http://msdn.microsoft.com/library/de...edirection.asp

David
Nov 16 '05 #2
Bob
Thanks a lot. This is what I needed. I think using the policy file is the
best choice for my situation.

After reading a little more about this, looks like the policy file (xml
file) needs to be compiled into an assembly (policy.*.dll) and this can only
be done using al.exe. Can VS.NET do this? I can't seem to find something
like a policy project in VS.NET. I have my common assembly project and its
setup project in one solution and want to keep everything related in one
place if possible.

It's odd that after the policy file is compiled into an assembly, the file
itself is still needed and must be deployed together with the policy
assembly. Maybe this is something Microsoft didn't quite finish.

Thanks again.
Bob

"David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...

" Bob" <bo*******@yahoo.com> wrote in message
news:es**************@TK2MSFTNGP10.phx.gbl...
I have a common assembly DLL that's installed into GAC (using msi created
by
a setup project). It contains classes used by all the applications we have.
This works well but when I increase the version number (say, from 1.0.0

to 1.01), all existing applications have to be recompiled even if the

change to
the assembly is to add new classes (that is, no change to existing classes).
I'd think there should be a way to make this version compatible. I have

to
increase the version # for the msi to automatically uninstall the older

DLL
and install the newer DLL properly when it's deployed.

Could anyone give me any suggestions? My goal is to keep the existing
client application intact (no recompilation) when new features are added

to
the common assembly (that is, no change to any existing public

interfaces in
the assembly).

You need to deploy the new assembly with a publisher policy.

"Vendors of assemblies can state that applications should use a newer
version of an assembly by including a publisher policy file with the
upgraded assembly. The publisher policy file, which is located in the

global assembly cache, contains assembly redirection settings."
-from
http://msdn.microsoft.com/library/de...edirection.asp
David

Nov 16 '05 #3

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

Similar topics

10
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...
6
by: someone | last post by:
Suppose that I have a class in an assembly that is delivered to the user, what can I do to change the class so that it doesn't break the binary compatibility? That is, user application can run...
3
by: Atul Godbole | last post by:
Suppose an assembly "Main" is using class "A" from another Assembly "Dep" as follows : A a = new A(); a.MethodOne(); At what time is the call to MethodOne linked to the actual MSIL (method...
2
by: Bob | last post by:
I have a common assembly DLL that's installed into GAC (using msi created by a setup project). It contains classes used by all the applications we have. This works well but when I increase the...
1
by: Robert | last post by:
I have a server where the main web application (root) is now migrated to 2.0. It's web.config has a line where it adds the system.data.oracleclient in the configuration and assembiles section. ...
6
by: Nak | last post by:
Hi there, I was wondering if anyone knew of a way to maintain compatability with assemblies providing the interfaces remains the same? At the moment if I re-compile an assembly without actually...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
0
by: Damon | last post by:
I've developed a VB.NET application which opens an Excel spreadsheet. I've referenced the Excel Interop Assembly version 11.0 (Excel 2003) on my machine. Then I tried to deploy this application,...
0
by: Andy | last post by:
Thanks Peter, I thought I'd give an update on this problem. My application had 2 assemblies that contained classed for the Data access and business logic layer. It was on one of them that I was...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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...
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: 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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.