Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build SQL Server project in VS Code

I have created a SQL Server project (.sqlproj) in Visual Studio and have loaded it in VS Code, using the MS SQL extension. I can connect to my database and run SQL scripts, but that is not the point of a SQL Server project.

In Visual Studio a SQL Server project can be built, which creates a single SQL script out of the various scripts in the project, which you can use to create the full database on an empty database server. You can also run the build against an existing database, which will create an update script that will ALTER the existing database to the new version.

Can I build the .sqlproj in VS Code or is this option not supported? If this option is not supported, ist there another extension that can do a similar thing?

like image 230
Sefe Avatar asked May 17 '26 11:05

Sefe


1 Answers

The VS Code MSSQL extension provides additional features for SQL Server development but doesn't include additional capabilities like build, deploy, etc. like SSDT projects in Visual Studio.

You can, however, use Azure Data Studio with the SQL Database Projects extension (currently in preview). ADS is based on VS Code and provides a similar IDE experience. The ADS extension will allow you to generate schema upgrade scripts similarly to Visual Studio. ADS also includes many other features and extensions to facilitate database development and management.

like image 59
Dan Guzman Avatar answered May 19 '26 02:05

Dan Guzman