How to manage and reference Nuget Packages with .dacpac inside in a .sqlproj VSCode project??? #276
Unanswered
martilux2580
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone,
My teammate and I were following the documentation about Nuget packages with dacpac files inside that you can reference on a SSDT project:
https://learn.microsoft.com/en-us/sql/azure-data-studio/extensions/sql-database-project-extension-sdk-style-projects?view=sql-server-ver16#package-references
We wanted to implement an SDK-styled .sqlproj project on VSCode (or VisualStudio if possible) on which you could get the Nuget packages with dacpacs from an Artifact Feed on Azure Devops and use the tables of that Nuget with dacpac in SQL Code.
We have a dacpac file in the directory where the .sqlproj file is and we followed these steps:
1. Connect to the Azure Artifact Feed by creating the nuget.config file and executing ./nuget.exe restore.
2. Created a Nuget package with a dacpac file inside. We have done that by creating a nuspec file and in the files tag of it set the ./test.dacpac file and using commands ./nuget.exe spec and ./nuget.exe pack.
https://learn.microsoft.com/en-us/nuget/create-packages/creating-a-package
3. Push the .nupkg Nuget Package to the Artifact Feed by using ./nuget.exe push command.
After that (and here comes the question), we really don´t know how to reference the tables inside the .dacpac file in a SQL Code, not even how to get the package from the artifact feed into our local project on VSCode. ¿Any help for that?
We are using the following:
VSCode 1.78.
VS 2019 with .NET 4.6 Framework (if required, we can try with VS2022 and .NET6.0).
SQL Server 2014 Management Studio (if required, we can try with 2019).
If there are any doubts with the question, don´t hesitate to comment and we will try to explain ourselves better. Have a nice day!!
Beta Was this translation helpful? Give feedback.
All reactions