Skip to end of metadata
Go to start of metadata

When you download a free trial of ReadyRoll from the Redgate website, you have 28 days to evaluate it.

Before installing ReadyRoll, please ensure that you have the pre-requisite software installed, as detailed on the requirements page. When you install ReadyRoll on a desktop machine, it's added as an extension to Visual Studio with a new project type and tool-window. For details on how to get started, see Create a ReadyRoll database project.

Performing a silent install

To perform an silent install of ReadyRoll (e.g. for automated or unattended installations), open an Administrator Command Prompt and execute the following:

Installing on your build agents

When setting up an automated build with a Continuous Integration server like TeamCity, Bamboo or Team Foundation Build, there are some ReadyRoll dependencies that you will need to install or include with your solution.

Depending on how you would prefer to manage its dependencies, a couple of options are available to you.

Option A: Install ReadyRoll on the build agent

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

Install the ReadyRoll build-time dependencies on your build agent by downloading and installing ReadyRoll onto the server (i.e. via remote desktop). 

Alternatively, copy the folder C:\Program Files (x86)\MSBuild\ReadyRoll (from a PC with ReadyRoll installed) to the same location on the build agent:

On build agents with a 32-bit version of Windows installed, ensure that you copy the abovementioned folder to C:\Program Files\ rather than C:\Program Files (x86)\.

Option B: Install 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 commit build-time dependencies to source control with NuGet

To integrate the build-time dependencies into your project, open the Package Manager Console tool-window and install the package from the NuGet gallery:

Visual Studio 2015 - Additional Step

In the latest version of the NuGet package manager, which ships with VS2015, you may receive an error when attempting to install the package:

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

Unfortunately Visual Studio now requires that a NuGet-compatible project be included in the solution prior to performing the package installation. The simplest way to resolve this is to add a blank new C# Library project to your solution and attempting the PowerShell command again.

This will install the package into the current solution, rather than into a specific database project within the solution; unfortunately, NuGet doesn't currently support SSDT-based projects. To work around this limitation, you'll need to update your .sqlproj manually to link the project to the NuGet package (via the .targets file).

To link the project to the NuGet package, firstly select the ReadyRoll database project in Solution Explorer, and click Project… Unload Project.

VS_Solution_NuPkg_Edit_Proj_1
Then, right-click the project in the Solution Explorer and click Edit Project.
VS_Solution_NuPkg_Edit_Proj_2
Find the <ReadyRollTargetsPath> element and replace the contents as follows:

Solution folder

The above ReadyRollTargetsPath string assumes that your solution file (.sln) is in the parent folder of the ReadyRoll database project (.sqlproj). 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 (i.e. the part that contains the sub-string "..\packages").

Save the project file, then right-click the project in the Solution Explorer and select Reload Project

VS_Solution_NuPkg_Edit_Proj_4
Confirm that the build-time dependencies have been successfully linked to the project by building the solution:
VS_Solution_NuPkg_Build_Proj
Now commit the solution/project changes along with the package files to source control.

Package restore not supported

Please note that ReadyRoll currently doesn't work with NuGet package restore, so unfortunately you will need to check all the package files into source control.

With Team Foundation Service (TFS), this may mean you'll need to manually add the files through the source control explorer, as the package's binary files are typically excluded from the Pending Changes view by default.

With these build-time dependencies in source control, your ReadyRoll projects can now be built on any compatible build agent using a Continuous Integration server such as TeamCity.

Other dependencies

If you would like to use gated deployment as part of your Continuous Integration process, you may also need to install some Microsoft-distributed dependencies on your build agents.

SQLCMD Utility

The SQLCMD utility requires two separate MSIs to be downloaded and installed from the Microsoft website:

  • SQL Native Client 11 (x86/x64)
  • SQL Command Line Utilities 11 (x86/x64)

Restart Required

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.

Installing a local instance of SQL Server Express

As mentioned in this article on Continuous Integration, we recommend that you use a local instance of SQL Server with gated deployment. This ensures that there are no collisions between build agents (i.e. if you are running multiple simultaneous builds on different build agents).

Installing SQL Server can be quite a long and tedious task, so instead of doing this manually, an alternative is to use Chocolatey. The package that is available from Chocolatey is pre-configured with a set of common default settings.

To install SQL Server 2012 Express Edition using Chocolatey, open a command prompt in administrator mode and run the following (not that this will also retrieve Chocolatey if you don't already have it installed):

These commands will take a while to run, but you shouldn't have to intervene or confirm any dialog boxes, and a restart should not be required.

Microsoft Licensing Terms

Please note that your acceptance of the Microsoft EULA’s is implied when you run these commands (legal information here).

ALTER SERVER ROLE

Regarding the last command above: this ensures that your build agent can access the newly-installed SQLEXPRESS instance (which installs as the default SQL Server instance on the machine). You might choose to make this access more restrictive if you know which user your build agent will run-as.
  • No labels