Manual build setup
Published 31 October 2017
This page walks you through the process of setting up a build for a ReadyRoll project in VSTS/TFS.
Follow these instructions if the version of TFS you are using does not have the ReadyRoll build template installed.
Note
The tasks described here may differ from the tasks you see in your version of TFS.
If so, it may be necessary to manually update or install the tasks from the Visual Studio marketplace.
Instructions on how to do this can be found here.
Instructions
For your chosen project, under the Build and Release tab, do the following:
- Create a new build definition
- On the 'Select a template' page, click 'Start with an Empty process'
Then add the following build tasks, in order:
- NuGet Tool Installer*
- ReadyRoll Download Build Components*
- ReadyRoll Set Target Database
- Visual Studio Build
- Copy Files
- Publish Build Artifacts
Then fill in the following fields on the tasks:
- Visual Studio Build
- MSBuild Arguments: /p:GenerateSqlPackage=True @"$(Build.SourcesDirectory)\$(ReadyRoll.MsBuildResponseFileName)"
- Platform: $(BuildPlatform)
- Configuration: $(BuildConfiguration)
- Copy Files
- Source Folder: $(Build.SourcesDirectory)
- Contents: **\bin\$(BuildConfiguration)\**
- Target Folder: $(Build.ArtifactStagingDirectory)
- Publish Artifacts
- Path to publish: $(Build.ArtifactStagingDirectory)
- Artifact name: drop
Finally, on the Variables tab, set the following variables:
- BuildConfiguration: release
- BuildPlatform: any cpu
Ensure the check box 'Settable at queue time' next to each variable is selected also.
*NuGet Tool Installer and ReadyRoll Download Build Components
These two tasks are designed to ensure the agent machine has the latest version of the ReadyRoll Build Components installed. These are optional tasks.
If these tasks cannot be included (for instance, the version of TFS you are using doesn't support one/both of them) you must ensure the agent machine has the ReadyRoll Build Components installed. You can find information about how to do this here.