Hello Team, i am trying to build a sql project with msbuild using self hosted windows agent in AKS but iam facing the error

anil nair 50 Reputation points
2024-08-02T05:16:54.1666667+00:00

I am using docker file building and pushing to Azure Container registry and providing the location of the image in YAML file to create a pod In AKS

"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

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
440 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,043 questions
{count} votes

2 answers

Sort by: Most helpful
  1. vipullag-MSFT 26,186 Reputation points
    2024-08-05T05:29:17.88+00:00

    Hello anil nair

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Based on the error details shares, looks like the error is related to the missing Microsoft.Data.Tools.Schema.SqlTasks.targets file. This file is part of the SQL Server Data Tools (SSDT) package, which is used to build SQL Server projects in Visual Studio.

    To resolve this issue, you need to install the SQL Server Data Tools (SSDT) package on the machine where you are running the build. You can download the latest version of SSDT from the following link: https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver15

    Regarding your question about building SQL projects on Linux servers, yes, it is possible to build SQL projects on Linux servers using .NET Core and the SQL Server command-line tools. You can find more information about this in the following Microsoft documentation: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-develop-use-vscode?view=sql-server-ver15

    Hope this helps.

    If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.

    0 comments No comments

  2. anil nair 50 Reputation points
    2024-08-07T07:26:47.2066667+00:00

    Thanks @vipullag-MSFT for your solution

    I have also found one solution in case of docker anyone facing this issue kindly follow this link https://stackoverflow.com/questions/60138653/ssdt-and-vstest-capability-missing-in-container-when-installing-visual-studio-bu