Skip to end of metadata
Go to start of metadata

The ReadyRoll build components depend on the migration scripts created by the Visual Studio extension.

The ReadyRoll build components work with any continuous integration server (eg, VSTS/TFS, TeamCity, Jenkins, Bamboo, etc), and let you:

  • build the database alongside an application as part of a continuous integration process
  • validate the migration scripts
  • run tSQLt tests, integration tests, etc
  • create a package used by the release components

Requirements

  • Any continuous integration server that can run MSBuild
  • For build-time migration script verification, then on the agents:
    1. Microsoft SQL Server Native Client (x86/x64)
    2. Microsoft Command Line Utilities for SQL Server (x86/x64)
    3. After installing the above, the machine (or agent process) must be restarted: the above installer adds the utility to the PATH system environment variable, enabling ReadyRoll to find and execute the SqlCmd utility.

Installation

The build components need to be installed on your build agents.

There are a couple of options available to you:

Option A – Install the ReadyRoll Visual Studio extension on each build agent:

If you have admin and remote desktop access to your build agents, you may find this to be the simpler of the two options.

Install the ReadyRoll build components on each build agent by downloading and installing the ReadyRoll Visual Studio extension (eg, via remote desktop).

Or, Option B – Use the ReadyRoll.MSBuild NuGet package:

If you don't have admin access to your build agents, or if you would like to control the versioning of your build-time dependencies, ReadyRoll also allows you to install the build components using the ReadyRoll.MSBuild NuGet package:

  1. In Visual Studio, open the Package Manager Console by clicking View then Other Windows then Package Manager Console.
  2. In the Package Manager Console, enter:

    Resolving the error "Project 'Default' is not found"

    If you get the error:

    Install-Package : Project 'Default' is not found.

    Then the simplest way to resolve this is to add a blank new C# Class Library project to your solution and try installing the package again.

    This error occurs because ReadyRoll projects don't support NuGet (because ReadyRoll depends on SSDT which is not supported by NuGet), and also, as of Visual Studio 2015, NuGet requires that a NuGet-compatible project be included in the solution prior to performing the package installation.

  3. In the Solution Explorer, right-click the ReadyRoll database project, then click Unload Project.
  4. In the Solution Explorer, right-click the ReadyRoll database project, then click Edit ....sqlproj
  5. In the .sqlproj file, find the <ReadyRollTargetsPath> definition, and replace it with:

    The above ReadyRollTargetsPath string assumes that your solution file (.sln) is in the parent folder of the ReadyRoll database project .sqlproj file. If the solution file is not in the parent folder, then you will need to modify the relative path in the above string as appropriate (that is the part that contains the sub-string "..\packages").

  6. Save the file.
  7. In the Solution Explorer, right-click the ReadyRoll database project, then click Reload Project.
  8. In the dialog box, click Yes.
  9. To confirm that the build components have been successfully installed, Rebuild Solution, then in the Output window, find the line containing "Using ReadyRoll toolpath" and check that the file is within your solution's packages directory.
  10. Commit the changes to source control.

    You will either need to do a NuGet restore during build, or also commit the packages folder to source control, just like with any other NuGet reference.

    You have now completed using the ReadyRoll.MSBuild NuGet package.

 

Getting started

For details on how to get started:

  • No labels