Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2007

Tip: Looking for answers? Try searching our database.

How to upgrade a GAC'ed dll

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fredrik Persson - 06 Sep 2007 13:14 GMT
Hi all

I'm building an application that contains a dll that will be used by several
other applications.
The dll is installed in the GAC, to make it easy for everyone to find it.
When my application is upgraded, I'm also installing a policy in the GAC so
any call to the old dll is redirected to the new one.

My problem is the following scenario;

1) My.dll 1.0.0.0 is installed in the GAC

2) My.dll is upgraded to 1.1.0.0 (replaces the previous version in the GAC)
  policy.1.0.My.dll is installed in the GAC, redirecting 1.0.0.0 to 1.1.0.0

3) My.dll is upgraded to 1.2.0.0 (replaces the previous version in the GAC)
  policy.1.1.My.dll is installed in the GAC, redirecting 1.1.0.0 to 1.2.0.0

After step 3, when an application is trying to use My.dll version 1.0.0.0,
it only gets redirected to My.dll version 1.1.0.0 and not to 1.2.0.0 which I
wanted.

Isn't it possible to use version redirection multiple steps?
Do I need to add a new policy AND update my old policys everytime I upgrade
the dll?

Thanks!
/Fredrik
Michael Nemtsev, MVP - 06 Sep 2007 14:21 GMT
Hello Fredrik,

Did u provide the publisher policy with your new assemblies? http://msdn2.microsoft.com/en-us/library/7wd6ex19%28vs.71%29.aspx

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

FP> Hi all
FP>
FP> I'm building an application that contains a dll that will be used by
FP> several
FP> other applications.
FP> The dll is installed in the GAC, to make it easy for everyone to
FP> find it.
FP> When my application is upgraded, I'm also installing a policy in the
FP> GAC so
FP> any call to the old dll is redirected to the new one.
FP> My problem is the following scenario;
FP>
FP> 1) My.dll 1.0.0.0 is installed in the GAC
FP>
FP> 2) My.dll is upgraded to 1.1.0.0 (replaces the previous version in
FP> the GAC)
FP> policy.1.0.My.dll is installed in the GAC, redirecting 1.0.0.0 to
FP> 1.1.0.0
FP> 3) My.dll is upgraded to 1.2.0.0 (replaces the previous version in
FP> the GAC)
FP> policy.1.1.My.dll is installed in the GAC, redirecting 1.1.0.0 to
FP> 1.2.0.0
FP> After step 3, when an application is trying to use My.dll version
FP> 1.0.0.0, it only gets redirected to My.dll version 1.1.0.0 and not
FP> to 1.2.0.0 which I wanted.
FP>
FP> Isn't it possible to use version redirection multiple steps?
FP> Do I need to add a new policy AND update my old policys everytime I
FP> upgrade
FP> the dll?
FP> Thanks!
FP> /Fredri
Fredrik Persson - 06 Sep 2007 14:52 GMT
Hi Michael

Yes, (at least) one publisher policy is included with the assembly.
I'm creating a msi using WiX, which installs my application, registers the
dll in the GAC and finally registers the publisher policy in the GAC.

What bugs me is that it seems that I need to include one policy-dll for each
major.minor-version that has been released earlier, when I'm creating a new
msi.

/Fredrik

"Michael Nemtsev" <Michael Nemtsev>, "MVP" wrote:

> Hello Fredrik,
>
[quoted text clipped - 39 lines]
> FP> Thanks!
> FP> /Fredrik
Michael Nemtsev, MVP - 07 Sep 2007 05:43 GMT
Hello Fredrik,

Yep, it is.
when u publish the new version it's better to provide the new published policy
for this
or update existed with the new redirection

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

FP> What bugs me is that it seems that I need to include one policy-dll
FP> for each major.minor-version that has been released earlier, when
FP> I'm creating a new msi.
FP>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.