Assembly version compatibility issue

Discussion in 'ASP .Net' started by Bob, Jun 2, 2004.

  1. Bob

    Bob Guest

    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
     
    Bob, Jun 2, 2004
    #1
    1. Advertising

  2. Bob

    David Browne Guest

    " Bob" <> wrote in message
    news:...
    > 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/d...uide/html/cpconAssemblyVersionRedirection.asp

    David
     
    David Browne, Jun 2, 2004
    #2
    1. Advertising

  3. Bob

    Bob Guest

    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 > wrote in
    message news:%...
    >
    > " Bob" <> wrote in message
    > news:...
    > > 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/d...uide/html/cpconAssemblyVersionRedirection.asp
    >
    > David
    >
    >
     
    Bob, Jun 2, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Prasanna Padmanabhan
    Replies:
    1
    Views:
    825
    Mattias Sjögren
    Nov 19, 2003
  2. WT
    Replies:
    6
    Views:
    943
    Walter Wang [MSFT]
    May 18, 2006
  3. V Green
    Replies:
    0
    Views:
    885
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,000
    PA Bear [MS MVP]
    Feb 5, 2008
  5. MowGreen [MVP]
    Replies:
    5
    Views:
    2,045
    PA Bear [MS MVP]
    Feb 9, 2008
Loading...

Share This Page