Skip to content

Commit 8572866

Browse files
authored
Merge pull request #22971 from MikeRayMSFT/20220616-recover-extension-sdk-style-project
Add sdk-project-extension
2 parents 5daff6c + b489b86 commit 8572866

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Use SDK-style projects with the SQL Database Projects extension
3+
description: Getting started using SDK-style SQL projects with the SQL Database Projects extension for Azure Data Studio or VS Code
4+
ms.prod: azure-data-studio
5+
ms.technology: azure-data-studio
6+
ms.topic: conceptual
7+
author: dzsquared
8+
ms.author: drskwier
9+
ms.reviewer: maghan
10+
ms.custom:
11+
- intro-get-started
12+
ms.date: 5/24/2022
13+
---
14+
15+
# Use SDK-style SQL projects with the SQL Database Projects extension (Preview)
16+
17+
This article introduces [Microsoft.Build.Sql](https://www.nuget.org/packages/Microsoft.Build.Sql) for SDK-style SQL projects in the SQL Database Projects extension in Azure Data Studio or VS Code. SDK-style SQL projects are especially advantageous for applications shipped through pipelines or built in cross-platform environments. The initial announcement is available in [TechCommunity](https://techcommunity.microsoft.com/t5/azure-sql-blog/microsoft-build-sql-the-next-frontier-of-sql-projects/ba-p/3290628).
18+
19+
> [!NOTE]
20+
> The SDK-style SQL projects is currently in preview.
21+
22+
## Create an SDK-style database project
23+
24+
You can create an SDK-style database project from a blank project, or from an existing database.
25+
26+
### Blank project
27+
28+
In the **Projects** view, select the **New Project** button and enter a project name in the text input that appears. In the **Select a Folder** dialog box that appears, choose a directory for the project's folder, `.sqlproj` file, and other contents to reside in.
29+
30+
By default the selection for **SDK-style project (Preview)** is checked. When the dialog is completed, the empty project is opened and visible in the **Projects** view for editing.
31+
32+
### From an existing database
33+
34+
In the **Project** view, select the **Import Project from Database** button and connect to a SQL Server. Once the connection is established, select a database from the list of available databases and set the name of the project. Select a target structure of the extraction.
35+
36+
By default the selection for **SDK-style project (Preview)** is checked. When the dialog is completed, the new project is opened and contains SQL scripts for the contents of the selected database.
37+
38+
## Build and publish
39+
40+
From the Azure Data Studio and VS Code interfaces, building and publishing an SDK-style SQL project is completed in the same way as the previous SQL project format. For more on this process, see [Build and Publish a Project](sql-database-project-extension-build.md).
41+
42+
To build an SDK-style SQL project from the command line on Windows, macOS, or Linux, use the following command:
43+
44+
```bash
45+
dotnet build /p:NetCoreBuild=true
46+
```
47+
48+
The `.dacpac` resulting from building an SDK-style SQL project is compatible with tooling associated with the data-tier application framework (`.dacpac`, `.bacpac`), including [SqlPackage](../../tools/sqlpackage/sqlpackage-publish.md).
49+
50+
51+
## Next steps
52+
53+
- [Build and Publish a project with SQL Database Projects extension ](sql-database-project-extension-build.md)

docs/azure-data-studio/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
href: extensions/sql-database-project-extension-build.md
9191
- name: Build a Project from the Command Line
9292
href: extensions/sql-database-project-extension-build-from-command-line.md
93+
- name: Use SDK-style projects
94+
href: extensions/sql-database-project-extension-sdk-style-projects.md
9395
- name: SQL Server Agent
9496
href: extensions/sql-server-agent-extension.md
9597
- name: SQL Server Central Management Servers extension

0 commit comments

Comments
 (0)