Click here to Skip to main content
14,827,050 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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\
MSBuild\Current\Bin\MSBuild.exe" -version
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

16.5.0.12403
C:\Temp>
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.
Simply running:
nuget install Microsoft.Data.Tools.Msbuild
installs the package in the current directory, and msbuild.exe still fails with the same error afterwards.
Posted
Updated 5-Nov-20 12:58pm
Comments
Maciej Los 5-Jun-20 11:18am
   
kfinke70 1-Mar-21 8:05am
   
Did you ever get this to work? I need the same thing.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900