Getting Microsoft.Data.Tools.Schema.SqlTasks.targets was not found from Jenkins pipeline

Viewed 844

I am getting this error

The imported project "C:\Program Files\dotnet\sdk\6.0.101\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\6.0.101\\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" is correct, and that the file exists on disk.

when running E2E test which will create the database using DACPAC. I am using this command to run my e2e test project

dotnet test "%workspace%\test\SampleProjectE2E\SampleProjectE2E.csproj"

I have checked in google. The answer I got is to install SSDT in build server. Not sure this will work or not. Please help.

1 Answers

Microsoft.Data.Tools.Schema.SqlTasks.targets are required to build a SQL database project from the command line

Required dependencies are available as Nuget package and just install in build server using the below command

dotnet add package Microsoft.NETFramework.ReferenceAssemblies --version 1.0.2

Related