I have a Visual Studio 2010 Database Project. It works great for most stuff.
However one thing is very annoying. Say I have a table called dbo.MyCoolTable. If I go the the database and rename it to dbo.MyKindaCoolTable it works fine in the database.
However, when I do a schema compare and write the changes back to my Database pro开发者_开发技巧ject it leaves the old file in the project. So I end up with two files (dbo.MyCoolTable.Table.sql and dbo.MyKindaCoolTable.Table.sql).
Once or twice this is not a problem, but over time this really adds up. And it is tedious to go through the project and manually delete each of these "left over" files.
Is there a way to just delete the "left over files" when I write to my Database Project from a Schema Compare?
Not that I know of in the current world, but some of the the Denali changes help with syncing code. I have not seen how far they take this paradigm, or had time to play with it, however. I know that does not help in the current world.
I recently found out this was happening to me too, so I wanted to find all the old files which have been commented out and delete them.
The scripts end with a ";" and the ones we want to get rid of are commented out, so doing a find and replace for all instances of ";*/" in the project (without the quotation marks) does a pretty good job of finding the scripts we want to get rid of, then it's just a matter of manually deleting the offending files from the project.
I wish there were a more elegant solution...
精彩评论