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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With