I'm trying to setup a Jenkins build system, to automate the build and test of our project when a developer pushes code into our internal github server.
The build system is a Windows Server Core with Jenkins and MSBuild.
This works fine for a simple C# "Hello World" test project, but not for the "real" project we're working on.
Apparently the system is missing the "SQL Server Data Tools" (SSDT) component, that is required by our project.
How can I install that SSDT component on that system?
(Knowing that it's Windows Server Core, so there's no GUI.)
What I have tried:
It's the latest version of MSBuild that's installed:
C:\Temp>"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
When I try to build the "real" project, I get this error:
C:\Program Files (x86)\Jenkins\workspace\NextGen_master\Frameworks\NextGen.SamplesData\NextGen.SamplesData.sqlproj(56,57): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Also, tried to find "Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
The reference to Visual Studio v11 is very bizarre!
Anyway, searching on the Internet, I see that this error is due to the "SQL Server Data Tools" (SSDT) component not being installed. Apparently it's not part of the standard components installed with the standalone MSBuild.
The only documented way for installing it is using the Visual Studio 2019 GUI... But there's no Visual Studio nor a GUI on this machine!
Searching further, I see that there's a nuget package called Microsoft.Data.Tools.Msbuild that may
contain what I need... But I don't find how to install it so that it integrates with the MSBuild tool chain already present.
nuget install Microsoft.Data.Tools.Msbuild
installs the package in the current directory, and msbuild.exe still fails with the same error afterwards.