Step 3: Create the build definition

The build and release definitions are Azure DevOps tasks, and should probably be done by an Azure DevOps admin. The build definition builds your project within your git repository, and the release definitions deploys it to your BizTalk Server environment.

Before you begin

Complete Step 2 - Create Azure DevOps token and install agent.

Add the Build tasks

  1. In your project, select Pipelines > Create Pipeline:

    Create a new pipeline project in BizTalk Server.

    Use the classic editor to create a pipeline without YAML:

    Use the classic editor without YAML to create a new pipeline in BizTalk Server.

    Select Azure Repos Git > Continue:

    Select Azure repos git to host your new pipeline in BizTalk Server.

  2. Select the Empty template > Apply:

    Select the empty template to create a new pipeline in BizTalk Server.

  3. Set the Agent Pool. Your options:

    • Azure Pipelines: Select this option to use Azure hosted agents > windows-2019:

      Select the Azure Pipelines for the agent pool in Azure DevOps and BizTalk Server.

    • Default: Select this option to use your own defined agent pool:

      Select the default queue for the agent pool in Azure DevOps and BizTalk Server.

  4. In Phase 1, add a task, select Visual Studio Build > Add:

    Add a Visual Studio build task to your BizTalk Server project.

  5. Select the Visual Studio Build task you just added, and set the following properties:

    • Display name: Enter your build solution, such as YourProjectName/YourProjectName.sln.
    • Visual Studio version: Select at least Visual Studio 2015. You can also select Latest.
    • MSBuild Architecture: Select MSBuild x86.

    Your properties look similar to the following:

    Sample Visual Studio build properties in your BizTalk Server project.

  6. In Phase 1, add a task, select Publish Build Artifacts > Add:

    Add a Visual Studio build artifacts task to your BizTalk Server project.

  7. Select the Publish Artifact task, and enter your preferred Display name. For Path to publish, select the ... button, and choose the application project folder (e.g. appProjectHelloWorld). Select OK.

    Select the publish artifacts task in your Visual Studio BizTalk Server project.

  8. The Artifact Name can be anything you want. Select Save.

  9. Go to Triggers, and set the Trigger status to Enabled:

    Add and enable a Visual Studio trigger to your BizTalk Server project.

  10. Save & Queue to test your build definition. When you queue, you are prompted for the agent queue and your branch. Select the Default agent queue, and choose your branch. Select Queue.

    In run pipeline, add the aqent queue and Azure DevOps branch in the Visual Studio BizTalk Server project.

  11. A new build is started, and you can select it to check for a success or failure.

What you did

In Azure DevOps, you created a build definition that builds your application within Git or Team Foundation Version Control (whatever you chose). When changes are made within the source control, the changes are automatically detected, and you can push them.

Next steps

Step 4: Create the release definition
Configure environmental tokens and variables