I've discovered that in Visual Studio 2010 Professional it is possible to refresh the database for a SQL Server Database Project (This feature is normally only available to the Premium and Ultimate versions). All you need to do is delete all the SQL files from the "Schema Objects" folder (but leave the folder structure intact) and the "Database.sqlpermissions" file. Then the "Import Database Objects and Settings..." option will become enabled, allowing you to refresh the database project with the latest schema.
I would like to write a macro for Visual Studio 2010 that can do this.
The macro should...
- Delete every .SQL file (or every file) in the "Schema Objects" folder and it's child folders, but do not delete the folders from the project. The files must be deleted AND removed from the project.
- Delete the file "Properties\Database.sqlpermissions". The file must be deleted AND removed from the project.
Any tips on writing macros in Visual Studio will help me. Thanks.