Date: Thu, 28 Mar 2024 09:56:47 +0000 (GMT) Message-ID: <1019435014.379.1711619807146@ip-172-31-38-4.eu-west-1.compute.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_378_275483864.1711619807141" ------=_Part_378_275483864.1711619807141 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The ReadyRoll build components depend on the migration scripts = created by the Visual Studio extension.
The ReadyRoll build components work with any continuous integra= tion server (eg, VSTS/TFS, TeamCity, Jenkins, Bamboo, etc), and let you:
Microsoft ODBC Driver 13.1 for SQL Server (x86/x64)
Microsoft Command Line Utilities 14.0 for SQL Server (<= a href=3D"https://www.microsoft.com/en-us/download/details.aspx?id=3D53591"= class=3D"external-link" rel=3D"nofollow">x86/x64)
The build components need to be installed on your build agents.=
There are a few of options available to you. Options A and B are easier = to set up and maintain, however if consistency between Visual Studio and Co= ntinuous Integration builds is a priority, Option C is recommended.
If you are building a ReadyRoll project with the build definition templa= te provided by the ReadyRoll extension, the ReadyRoll build components will= be installed to your build agent automatically using two build tasks: = ;NuGet Tool Installer and ReadyRoll Download Build Components.=
If you have a custom build definition, just add these two= tasks before the Visual Studio Build task.
Some versions of TFS may not support these tasks. If you cannot find the= m in your version of TFS, consider options B or C.
More detailed instructions on how to set up a ReadyRoll build in VSTS/TF= S can be found he= re.
If you have admin and remote desktop access to your build agents, you ma= y find this to be the simpler of the two options.
Install the ReadyRoll build components on each build agent by d= ownloading and installing the ReadyRoll Visual Studio extension (eg, via remote desktop= ).
If you don't have admin access to your build agents, or if you would lik= e to control the versioning of your build-time dependencies, ReadyRoll also= allows you to install the build components using the ReadyRoll.MSBuild NuGet package.
The below steps differ to the standard package installation/upgrade proc= ess due to the lack of support within the NuGet client= for database projects. This necessitates the addition of an (otherwise= empty) class library project within your solution, which acts as a placeho= lder for the NuGet package reference.
In the Package Manager Console, enter:
I= nstall-Package ReadyRoll.MSBuild
In the .sqlproj file, add the following snippet under the r= oot node (<Project>):
<Prop= ertyGroup> <ReadyRollNuGetBaseFolder>$(MSBuildThisFileDirectory)..\packages<= ;/ReadyRollNuGetBaseFolder> <ReadyRollNuGetIsRestored Condition=3D"$([System.IO.Directory]::GetDir= ectories($(ReadyRollNuGetBaseFolder), 'ReadyRoll.MSBuild.*').Length) !=3D 0= ">True</ReadyRollNuGetIsRestored> <ReadyRollTargetsPath Condition=3D"$(ReadyRollNuGetIsRestored) =3D=3D = 'True'">$([System.IO.Directory]::GetDirectories($(ReadyRollNuGetBaseFold= er), 'ReadyRoll.MSBuild.*')[0])\tools\ReadyRoll.Data.Schema.SSDT.targets<= ;/ReadyRollTargetsPath> </PropertyGroup>
If your project was created with ReadyRoll 1.14.17 or earlier, the .= sqlproj file will contain another instance of the <ReadyRollTar= getsPath> element. Ensure that the element is only specified once b= y replacing it with the above <ReadyRollTargetsPath> definit= ion.
The <ReadyRollNuGetBaseFolder> element in the above snipp= et assumes that your solution file (.sln) is in the parent folder of the Re= adyRoll database project .sqlproj file. If the solution file is no= t in the parent folder, then you will need to modify the relative path in t= he value as appropriate (that is the part that contains the sub-string "..\packages").
Commit the changes to source control.
You will either need to do a NuGet restore during build, or als= o commit the packages folder to source control, just like with any= other NuGet reference.
You have now completed the installation of the ReadyRoll.MSBui= ld NuGet package.
In the Package Manager Console, enter:
U= pdate-Package ReadyRoll.MSBuild
Close and re-open the solution. Thi= s is needed in order for the upgrade to take effect within the database pro= jects.
To confirm that the build components ha= ve been successfully upgraded, Rebuild Solution, then in t= he Output window, check that the ReadyRoll version matches= that of the upgraded NuGet package.
For details on how to get started: