Firstly, I really like the Deployment Framework, thanks for efforts.
I have an assembly that is shared across multiple BizTalk applications. I included it as an ExternalAssembly in each application. But when I undeploy one of these applications in unGAC's this assembly and the remaining BizTalk application can't
run as the assembly is fully removed from the GAC.
I can't use the AdditonalFiles option as that doesn't GAC the files from what I can see.
And SharedAssemblies is only for the shared components that come with the framework.
Is there way to deploy my common DLL's with each app, but not have them undeploy. You've done so much of the work for me so far, wondering if the framework can handle this. Or should I create an external installer for these .NET components.
I'm using Windows 2008 R2 and from what I read its advised to not use GACUTIL, but to write installers using WIX.
May 26, 2011 at 5:04 AM
Thanks for the question. What you're describing makes it unclear as to what app owns the responsibility for undeploying the DLL when all apps that depend on it are gone. This is when you get into some kind of reference counting mechanism,
which has already been solved by Windows Installer.
There are a couple of valid options.
One is to create a simple MSI as you described, and yes, the documentation says not to use Gacutil. The reason why is exactly what you are seeing -- gacutil does not go through the Windows Installer engine, and thus it has no reference counting and
freely blows DLL's out of the GAC upon request. If you separately package the DLL's into another MSI, then chances are someone won't come along and uninstall your common MSI (note that there will still only be a ref count of 1 on
those DLL's; the BizTalk app installers do not add to the ref counts). WiX does take some learning, but you would have a very basic WiX XML configuration for this.
Two is to create a separate BizTalk "Common" app and create a regular BTDF deployment project around it. I do this a lot. Any common BizTalk artifacts and shared DLL's go into this project, and you just have to know to deploy it before any other
BizTalk app. I generally configure the dependent apps to add a reference to the common app to prevent accidental undeployments.
Hope that helps!