Geeks With Blogs

News View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn

Michael Stephenson keeping your feet on premise while your heads in the cloud

In the BizTalk Build Generator, in addition to the normal build scripts which you can produce there is also a library of MsBuild tasks which help you to implement some of the common scenarios for extending your build process. In this post I will discuss how you can extend the build to include the management of BRE artefacts within the build.

In the tasks library you will find the following tasks:

Task Name

Task Description


This task is used to backup all of the current artefacts within BRE before you build goes making changes. This means if you make some kind of mistake you can easily restore it to its previous state.


This task will undeploy a policy from BRE. The task supports undeploying all or specific versions of the policy.


This task will remove a policy from BRE. The task supports removing a specific version or all versions of a policy.


This task will remove a vocabulary from BRE. The task supports removing a specific version or all versions of a vocabulary.


This task will import a BRE vocabulary


This task will import a BRE policy


This task will deploy a policy to BRE. The task supports deploying a specific version of the policy or all versions of a policy.


The tasks basically just leverage the underlying assemblies which are used by the rules deployment wizard.

The below sample taken from some of the build generators tests demonstrates how to use some of the tasks.


<?xml version="1.0" encoding="utf-8"?>

<Project xmlns="">

    <Import Project="BizTalk.BuildGenerator.tasks"/>

    <Target Name="Build">

        <BizTalk.BuildGenerator.Tasks.BRE.BackupBRE FolderPath="."/>

        <BizTalk.BuildGenerator.Tasks.BRE.UndeployPolicy PolicyName="BizTalkBuildGeneratorTestPolicy"/>

        <BizTalk.BuildGenerator.Tasks.BRE.RemovePolicy PolicyName="BizTalkBuildGeneratorTestPolicy"/>

        <BizTalk.BuildGenerator.Tasks.BRE.RemoveVocabulary VocabularyName="BizTalkBuildGeneratorTestVocabulary"/>

        <BizTalk.BuildGenerator.Tasks.BRE.ImportVocabulary FilePath="TestVocabulary.xml"/>

        <BizTalk.BuildGenerator.Tasks.BRE.ImportPolicy FilePath="TestPolicy.xml"/>        

        <BizTalk.BuildGenerator.Tasks.BRE.DeployPolicy PolicyName="BizTalkBuildGeneratorTestPolicy"/>                            



Posted on Monday, August 17, 2009 5:22 PM BizTalk , BizTalk Build & Deployment , blogdoc | Back to top

Comments on this post: Using the Build Generators BRE Tasks for MsBuild

# Thanx good
Requesting Gravatar...
tHanx cool style.
Left by dans on Aug 19, 2009 3:52 AM

Your comment:
 (will show your gravatar)

Copyright © Michael Stephenson | Powered by: