dotnet publish failing for SQL Project

Arjun Goel (DevOn) 0 Reputation points
2024-02-05T07:24:21.8366667+00:00

Hi Microsoft, I am working on building the CI/CD pipeline for a SDK-style SQL project. Here is the link to my GitHub repo https://github.com/arjungoel/sql-server-cicd-demo. I have a couple of questions around the same i.e.

  1. Is it by design that the project will be .NET MVC and if so why the CLI commands is triggered with dotnet not via MSBuild.
  2. While I am publishing the build for local development purposes without publishing it directly to the target server (as a good practice for Production based deployments), I am facing this issue C:\Users\Administrator.nuget\packages\microsoft.build.sql\0.1.9-preview\tools\netstandard2.1\Microsoft.Data.Tools.Schema .SqlTasks.targets(1859,7): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskEx ecutionHost.Execute() [C:\database-projects\sql-server-cicd-demo\GitHub-SQLServer2022-SDK-DBProject.sqlproj] The command I am running is dotnet publish /t:publish /p:SqlPublishProfilePath="C:\database-projects\sql-server-cicd-demo\sql-server-cicd.publish.xml" "C:\database-projects\sql-server-cicd-demo\GitHub-SQLServer2022-SDK-DBProject.sqlproj" I have created the project using Azure Data Studio and following the document https://learn.microsoft.com/en-us/azure-data-studio/extensions/sql-database-project-extension-build-from-command-line but I am not sure where to add the lines. 3. How can I pass the connection string in the form of environment variables/secrets using GitHub Actions as while I am passing I was not successful so I have to hardcode the values which is not a good practice. Please help me as I am stuck with these issues and that is delaying our deployment. Hope for a positive feedback!
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,073 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ManoharLakkoju 305 Reputation points Microsoft Vendor
    2024-02-06T11:50:35.5133333+00:00

    @Arjun Goel (DevOn)
    Welcome to Microsoft Q&A Platform, thanks for posting your query here. Azure DevOps related queries/issues are currently not supported on this Microsoft Q&A platform. I would request you to please post your queries in dedicated forums as in below links: https://developercommunity.visualstudio.com/spaces/21/index.html https://developercommunity.visualstudio.com/t/get-unique-id-from-devops-organization/756710 https://stackoverflow.com/questions/tagged/azure-devops

    0 comments No comments