Pain Re-deploying Assemblies to Biztalk 2004

Home Page Forums BizTalk 2004 – BizTalk 2010 Pain Re-deploying Assemblies to Biztalk 2004

Viewing 1 reply thread
  • Author
    Posts
    • #12697

      1) With your assembly deployed and orchestrations bound, use the Biztalk deployment wizard and Export the bindings for your assembly. Create a binding folder in your biztalk project and put the .xml file in there. Ok, thats the end of the GUI part, everything else is script…

      2) Find your assembly’s DLL under your project folder (usually under bin\\Deployment) and make a note of the full path to the DLL.

      3) Open up Notepad and bang out this simple script and save it wherever you put the binding file from step (1)

      NOTE: Replace {DLLPATH} with the path to your DLL from step 2. Replace {BINDINGPATH} to the path to your XML file from step 1.

      [b:ffeef8a05b]BTSDEPLOY remove assembly={DLLPATH} uninstall=true
      BTSDEPLOY deploy assembly={DLLPATH} install=true
      BTSDEPLOY import binding={BINDINGPATH}[/b:ffeef8a05b]

      Save the script in the same folder as your binding file, with a name like deploy.bat

      Now your steps are reduced to: Stop & Unenlist Orchestration. Fix code in broken Orchestration. Build project. Run script.

      If you want to get even a bit fancier, you can have your script recycle BizTalk (since Orchestrations really won’t reload the new code until you recycle).

      Go get the guid for your BizTalk installation by running regedit and opening HKLM\\System\\CurrentControlSet\\Services and find the BTSSvc{biguglyGUID} key. Make a copy of the whole key name including the GUID. Then add the following to the end of your deploy.bat

      [b:ffeef8a05b]NET STOP BTSSvc{yourGUIDhere}
      NET START BTSSvc{yourGUIDhere}[/b:ffeef8a05b]

      Its not pretty, but it does provide one-click simplicity for the undeploy/redeploy/bind/bounce dance that BizTalk developers have to do.

    • #12698

      Also out there is the Deployment Framework that has been created by Scott Colestock. It can be found at his website [url]http://www.traceoufthought.net[/url] Lets you bounce everything from right in Visual Studio and you can also set up some pretty neat custom processing stuff as well.

      • #12699

        If I am not mistaken, rightclick on your project(not the solution) and go to properties. On the left pane go to configuration properties then to deployment. On the right pane now, set redeploy to true.
        when that is done all u have to do is to unlist the project orchestrations before and checking all boxes to get rid of existing instances before deploying. U do not have to delete any ports or anything of the sort.

        Chenue

        • #12700

          Chenue…

          It is a bit more than just unenlist/stopping and restarting things.

          For instance, if you have a port with map attached, you cannot redeploy the project (containing the map) without removing the map from the port. Similarly, if you have the custom pipeline attached to the map, it will be removed automagically (I think this happens if the pipeline is used by only one port) and if you redeploy the project containing pipeline, you will have to reconfigure the port properly.

          I agree that these ports need not be deleted everytime the solution is (re)deployed. But, some changes are required.

          The best thing is to go with binding xml files with scripts as some of the earlier posts suggested.

          Thanks,
          Ken

          • #12701

            Jon has lots of insight into deployment issues, but one of my favorite entries has to be this one:

            http://www.masteringbiztalk.com/blogs/jon/PermaLink,guid,628aecb9-4eaa-4044-88c9-92cb53f81bdf.aspx

            If you look at his grid for when you must undeploy/redeploy you can see that if you make changes to an orchestration, without changing/adding/removing ports, then its a simple matter of just deploying your fixed assembly to the GAC and recycling the biztalk service. Most of my orchestration issues center on not writing good xpath expressions, so I’m constantly changing one or two message assignment shapes and then redeploying. This trick has saved me tons of time.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.