Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Pain Re-deploying Assemblies to Biztalk 2004
- This topic has 7 replies, 1 voice, and was last updated 6 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
January 23, 2006 at 4:48 PM #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.
-
January 23, 2006 at 5:42 PM #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.
-
January 25, 2006 at 12:57 PM #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
-
January 26, 2006 at 3:26 PM #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-
January 26, 2006 at 4:12 PM #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.
-
January 23, 2006 at 6:37 PM #12702
Jon Flanders has a tool to help here: http://www.masteringbiztalk.com/blogs/jon/CategoryView,category,BTSnapshot.aspx
Also, the BizTalk Development Tool on my site more light weight can save you some time as well: https://biztalkgurus.com/Tools/Development-Helper-Tool.html
-
January 23, 2006 at 9:41 AM #12703
Is it me or is it a huge pain to re-deploy solutions.
here’s what i do:
– I un-enlist all orcherations in biztalk explorer (i check all the checkboxes when asked to terminate/stop ports and instances)
– i go into each orchesration and unbind the ports
– i delete the ports that are \”Specify Now\”
– undeploy assembly
– redeploy assembly
– bind ports that are \”Specify Later\”
– start orchestrations
– wait 30 seconds
– testI have a feeling there’s a nice script that could be written to automate that tideous process.
Any ideas?
Thanks
-
January 23, 2006 at 5:54 PM #12704
thanks guys very useful posts
-
-
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.