Yossi Dahan [BizTalk]

Google
 

Friday, January 05, 2007

Import MSI Gotcha

When deploying BizTalk MSI's to servers I usually import them in the Admin Console before running the MSI.

The main reason is pure laziness - in the last screen of the import wizard there's a small checkbox you can tick to have the wizard start the MSI installation and that saves me from the hassle of browsing to it again. as simple as that.

Of course that fact that this tick box exists implies that doing things in that order is supported and, indeed, in most cases there's absolutley no problem with it.

Only that we've recently found a case where this approach does not work.

Apparently when you import a policy (or vocabulary, not sure which one actually causes the problem) that is using a .net object as a fact, BizTalk tries to load the assembly with the .net class from the GAC at the import stage.

I'm not sure why it does that, presumably for some sort of validation, but possibly just an oversight; anyway, what that means is that, if the assembly containing the .net class is in the same MSI as the policy/vocabulary, when BizTalk tries to import the policy it has not (yet) added the assembly to the GAC and so the import would fail.

Making sure the assembly is in the GAC before starting the import (i.e 'installing' the MSI before 'importing' it) avoids this issue.

And another important note - to make things worse the Admin console seems to "remember" the fact that the assembly was not found, so if you try to import the MSI, get the error, close the wizard, add the assembly to the GAC and then try to import again you will be very surprised to fail again.

All you need to do is close the Admin Console and open it again and, assuming the assembly is now in the GAC you should be able to import the MSI succesfully.

Labels:

1 Comments:

  • Thanks a lot. I had spent around 2 hours figuring out why the heck my policy is not deploying. And then I came across your blog.

    Anyways, this is a ridiculous behavior of BizTalk Admin console.

    By Anonymous Anonymous, at 13/09/2010, 20:33  

Post a Comment

<< Home