Wednesday, January 16, 2008

Creating MSI Deployment Package for BizTalk Application

Step1
Compile and deploy your application. GAC all you dependent assemblies. All ports created and configured. Test the application and the application should be in running condition.

Step2
Create the Binding files using BizTalk Admin Console: RightClick on that particular application à Export à Bindings
Give a name of the Binding xml file and save it to a folder.
Binding File is basically an XML file which can be read easily. You can copy your binding file edit it according to your Staging or Production environment, save it along with your Dev binding file.

Playing with the Binding Files:
Under Port section you can see port names:
Under SendPortCollection you see sent port path, which can be modified for your DEV or STG or PRD envUnder ReceivePortColletion you can see receive port paths, which can be modified for you DEV or STG or PRD env.


Step3
Include the resources for MSI : RightClick Resources folder under your Application à Add à BizTalk Assemblies
It pops up the Add Resources DialogBox

a) Add all the BizTalk Assemblies from its Bin folders of the projects.
b) Add all the .Net/Helper Assemblies from its Bin folders of the project.
c) Add all the Binding files (DEV/STG/PRD) from its location (ref. Step2)

Make the following selections for BizTalk Assemblies:
a) Check “Overwrite All” checkbox
b) Check all 3 check boxes for Global assembly Cache for MSI as give below.

Make the following selections for Helper/.Net Assemblies:
a) Check “Overwrite All” checkbox
b) Check first 3 check boxes related to GAC (these are self-explaining)
Make the following selections for Binding XML Files:
a) Check “Overwrite All” checkbox
b) Type DEV or STG or PRD for corresponding Bindings files to set the appropriate environments.
That’s All. Click OK the create the MSI package.

Step 4
Deployment to target Env:
Now, copy the MSI file to the target machine (say DEV) and open BizTalk Admin Console.
RightClick on Applications à Import à MSI files
It will pop up the Import Wizard. Browse to the MSI file and click Next.
In the Application Settings page, select Overwrite resources check box and click Next.
In the Application Target Environment Settings page, select the appropriate Env from the dropdown list as DEV or PRD or STG. This will tell the wizard to pick up the appropriate binding file while deploying.
Click Next will take you to the Summary page and then you need to click Import to complete the deployment.

This MSI import will create all the ports and configure it with orchestrations. Only thing you need to is to run the application from you BizTalk Admin Console.

Note: Import or Deployment might fail if you have not created all the necessary folders (identically named as in your binding files) in the hard disks for the Receive locations and Send port locations. So, before you import the MSI, create the appropriate paths for the Receive and Send ports.

Thanks for reading this ill-prepared doc.


Error in creating a port or deploying a BizTalk solution using MSI

Error in creating a port or deploying a BizTalk solution using MSI:

I recently came across this error while deploying a BizTalk 2006 solution and importing the MSI that I created in dev box. I was clueless on this error. It seems that some permission issue is there.
Then I tried to create a send port manually in the BT admin Console. I got similar error:
The I figured out that my login should be a part of BizTalk Administrators Group in the Box. I added myself in the group and it worked fine.