Can visual studio build tools with VS community edition be used for production workloads?

Banerjee, Swarnava 0 Reputation points
2024-04-08T12:55:05.7033333+00:00

I want to deploy a SQL Solution using azure dacpac file. The release pipeline should use a private build agent. As per requirement, sqlpackage.exe should remain install inside that build agent.

To install sqlpackage.exe can we use VS community edition with visual studio build tools?

Azure SQL Database
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,189 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 54,806 Reputation points
    2024-04-08T15:21:43.93+00:00

    I'm a little confused as to what your ask is. Deploying DACPACs isn't a VS thing bug a release pipeline (Azure DevOps?) thing. If you're asking whether you can install VS community on your machine in order to get sqlpackage on your release agent then yes you could but that is overkill.

    If you need to ensure that sqlpackage is installed on your build/release agent machine then use dotnet tool to download it. Once it is downloaded it is then accessible to your agent to run. It should ideally be downloaded on every release so you have the latest version. To download it refer to the following article.

    0 comments No comments

  2. GeethaThatipatri-MSFT 29,477 Reputation points Microsoft Employee
    2024-04-09T00:59:18.5166667+00:00

    @Banerjee, Swarnava Welcome to Microsoft Q&A thanks for posting your question.

    Here are few different scenarios in Azure DevOps and slightly different best solutions.

     

    1. If you want to use the built-in Azure DevOps task for “DeployDacPac” or similar, you need to install either the DacFx.MSI (Download and install SqlPackage - SQL Server | Microsoft Learn) or Visual Studio Community with the Data Platform workload (also known as SSDT). If you want to build the dacpac from a SQL project source in the pipeline, you need to install Visual Studio Community with the Data Platform workload.  For this reason, it is the usual recommendation to install Visual Studio Community and keep it up to date.  I am not a lawyer or a license advisor, but if you concerned about the Visual Studio Community allowed use, I encourage to check out the full terms which call out SQL development as permitted in any organization with VS Community.

     

    1. If you are interested in calling SqlPackage directly and does not need to build the dacpac in the pipeline, I recommend using the dotnet tool SqlPackage.  The dotnet tool SqlPackage is easier to keep up to date and will pick up core .NET security fixes faster than the standalone releases.

     

    1. If you have moved to the SDK-style SQL projects (Microsoft.Build.Sql) and interested in calling SqlPackage directly, then the conversation is much simpler.  Use the SqlPackage dotnet tool on the dacpac, which can be generated in the pipeline with dotnet build.  This is the “better and leaner” option but unfortunately this project type is not yet supported for editing in Visual Studio.

    I hope this information helps, please let me know if you are looking for any additional information.

    Regards

    Geetha


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.