VSDBCMD: Create a .dbschema File from an Existing Database

If you have a Visual Studio Database project and want to reference an existing database, you can generate a .dbschema file from the command line. Here’s an example:


vsdbcmd /a:Import /cs:”Server=(local);Database=MyDatabase;Trusted_Connection=True;” /dsp:SQL /ModelFile:MyDatabase.dbschema


Hope this helps!

This entry was posted in MS SQL Server, Visual Studio. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *