Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Assembly version compatibility issue

Reply
Thread Tools

Assembly version compatibility issue

 
 
Bob
Guest
Posts: n/a
 
      06-02-2004
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


 
Reply With Quote
 
 
 
 
David Browne
Guest
Posts: n/a
 
      06-02-2004

" Bob" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
 
Bob
Guest
Posts: n/a
 
      06-02-2004
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 http://www.velocityreviews.com/forums/(E-Mail Removed)> wrote in
message news:%(E-Mail Removed)...
>
> " Bob" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception occured While loading dynamically EXE assembly in C++/CLI(Could not load file or assembly ', Version=1.0.3836.39802, Culture=neutral,PublicKeyToken=null' ...) glitteringsounds C++ 1 07-03-2010 07:49 PM
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] ASP .Net 5 02-09-2008 01:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] ASP .Net 0 02-05-2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green ASP .Net 0 02-05-2008 02:45 AM
msg, compatibility issue with this version of windows =?Utf-8?B?RXJpYw==?= Wireless Networking 0 03-27-2006 01:12 PM



Advertisments