Visual Studio 2017 and MSBuild Deployments

posted Jan 22, 2018, 4:50 PM by Eric Patrick   [ updated Jul 6, 2018, 12:35 PM ]
For a machine with Visual Studio 2017 only, see qbo.Sample.2017.proj for changes needed to make CI deployments work.

To sum up:
  • Download and install the Build Tools for Visual Studio 2017
  • Ensure your project file targets VS version 15 (2017), instead of 14 (2015):
    • <VS Condition=" '$(VS)'=='' ">15.0</VS>
  • BuildTools does not include SSDT and SQL components by default. Copy the Microsoft database target (SSDT, SQL) from the Visual Studio folder to the BuildTools folder:
    • Copy-Item 'C:\Program Files (x86)\Microsoft visual studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\SSDT\*.*' 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\SSDT'
    • Copy-Item 'C:\Program Files (x86)\Microsoft visual studio\2017\Professional\Common7\IDE\Extensions\Microsoft\SQLDB' 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\Extensions\Microsoft\SQLDB' -recurse -force
  • Run the 2017 build:
    • & 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\MSBuild' .\qbo3.Sample.proj 
To integrate database builds into a fully automated CI environment, consider installing the MS Build data tools Nuget package.