The Kinetic Jump site navigation header requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

Welcome Guest Search | Active Topics | Log In | Register

Install GAC assembly question Options
Edhy
#1 Posted : Monday, August 23, 2010 11:07:56 AM
Rank: Newbie
Groups: Member

Joined: 10/11/2009
Posts: 18

Hi Brian,

My application installs some of the assemblies in the GAC using InstallAware setup.  Now I need to update some of those assemblies and see the note in the Install GAC Assembly: "Assemblies that are placed in the global assembly cache by a Windows Installer package (msi) should be maintained using a Windows Installer package."

If that is the case, then does that mean that I cannot use AppLife Update to update new versions of these assemblies initially installed with my setup?  That would mean that I have to create a big InstallAware setup to re-deploy the update, or am I missing something?

 



Edhy Rijo
brianh
#2 Posted : Monday, August 23, 2010 11:55:14 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 351
Location: Minnesota

Hello Edhy,

 

The reference counting method used by the Windows Installer doesn't have a publicly available API with which we can use to integrate our GAC actions with.  What this means is that we cant use an AppLife Update action to remove the assembly that your MSI places in the GAC because we cannot remove the reference. The only way to remove that reference and allow the assembly to be removed from the GAC is to uninstall your application.

 

You can install a new version of your assembly into the GAC using our GAC actions, and your new software can operate just fine referencing the new version. Just ensure that you increment the assembly version.  Future updates will be able to remove the assembly placed by an AppLife Update action from the GAC before replacing it with yet another newer version, but the original assembly version installed by your msi will still be in the GAC until your application is uninstalled.  In addition, when your application is uninstalled, any assemblies placed by AppLife Update's GAC action will be left behind, unless you take action in your installer to remove them.  The uninstall issues and reference counting is the reason for the warning on the action editor.

 

Knowing this, you can hopefully decide the best approach to maintaining GAC assemblies.  Unless there is a clear and present benefit to installing assemblies into the GAC, I usually recommend against it. Isolating application assemblies into your install directory is far more easily maintainable.

 

 

Brian Haas
Kinetic Jump Software
Edhy
#3 Posted : Monday, August 23, 2010 12:11:30 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2009
Posts: 18

brianh wrote:
Future updates will be able to remove the assembly placed by an AppLife Update action from the GAC before replacing it with yet another newer version, but the original assembly version installed by your msi will still be in the GAC until your application is uninstalled.

Thanks for the explanation, now it makes sense.  With major updates I usually build a new setup to be installed using AppLife Update, so I guess I will be safe by simply building small updates and using the Install/UnInstall GAC Assemblies.

So to make sure I got it, in future updates, if I need to update previous assembly installed/updated with AppLife Update, should I Uninstall it first?  And Reference type be left to "None"?

P.S.

I used to have all assemblies in the application folder, but found couple of users trying to copying all folder to another computer to run application from there, so just to make it a bit difficult, I decided to move all 3rd party assemblies to the GAC.



Edhy Rijo
brianh
#4 Posted : Monday, August 23, 2010 12:32:31 PM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 351
Location: Minnesota

Hello Edhy,

 

Yes, I would uninstall the previous versions as you install newer versions during your updates.  Reference type of none would be appropriate for this, as you are not installing these assemblies to be used by multiple applications.

Brian Haas
Kinetic Jump Software
Edhy
#5 Posted : Monday, August 23, 2010 12:36:11 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2009
Posts: 18
Great!, thanks again Brian.


Edhy Rijo
Edhy
#6 Posted : Monday, August 23, 2010 12:46:40 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2009
Posts: 18

For the record, I just released an update installing a missing assembly to GAC and it worked just fine. 

 

Also I implemented the AppLife Window Service and now users with Limited Security account have a much better experience installing my updates wihout the need for the Administrator to come and issue a "Run As" under the Administrator account to install te update.

Very impresive!!!!



Edhy Rijo
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.