Skip to content

GitHub Hosted Runner v2.330: Missing SSDT (Microsoft.Data.Tools.Schema.SqlTasks.targets) required for SQL Projects #4159

@omar-freemarket

Description

@omar-freemarket

Describe the bug
After upgrading the GitHub Actions self-hosted runner application from v2.328 to v2.330, our MSBuild steps that handle SQL projects (.sqlproj) have started failing. The build fails because it cannot find the SQL Server Data Tools (SSDT) targets file: Microsoft.Data.Tools.Schema.SqlTasks.targets. This indicates that the necessary SSDT components are either missing or have been moved in the new runner's environment, causing a build breakage for SQL database projects.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure the self-hosted runner application is updated to v2.330.x.
  2. Run a workflow that executes msbuild on a solution (.sln) containing a SQL Database Project (.sqlproj).
  3. The msbuild step fails with the error MSB4226.

Expected behavior
The build should successfully find and use the SQL Server Data Tools (SSDT) components required to compile the .sqlproj file, as it did when running on the runner application v2.328.x. The expected behavior is a successful build and compilation of the database project.

Runner Version and Platform

Version of your runner?
v2.330.x

OS of the machine running the runner?
Windows Server 2022

What's not working?

The MSBuild step fails because it cannot resolve an imported project path related to SSDT.

The error message shows the system is using a newer MSBuild installation path (Visual Studio\18\BuildTools), but the required SSDT targets file is being looked for in a path referencing an older Visual Studio version (v16.0):

C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets

Job Log Output

C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\Bin\amd64\MSBuild.exe
msbuild.exe MSBuild version 18.0.5+e22287bf1 for .NET Framework
MSBuild auto-detection: using msbuild version '18.0.5.56406' from 'C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\Bin'.
C:\Users\ContainerAdministrator.nuget\packages\microsoft.build.sql\0.1.14-preview\Sdk\Sdk.targets(22,89): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Also, tried to find "Microsoft\VisualStudio\v16.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\18\BuildTools\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths. [C:\home\runner_work\Main\Main\src\Core.Database\Core.Database.sqlproj]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions