Category Archives: SSDT

Renaming SSDT project brakes build

I thought I would do some cleaning up in my SSDT solution which turned out a bad idea.

In my solution I have three database projects which all started with the name “Database”. It seemed a good idea at the time because I also have several unit test projects having the same name as the database projects so I started those projects names with “UnitTestAdventureWorks” and “DatabaseAdventureWorks”.

I changed my mind as the icons for the database projects and unit tests are different and it just looked a lot more cleaner without the names Database and UnitTest in their project names.

Once I got rid of the prefixes and started to build…BAM, could not found project file “DatabaseAdventureWorks”. Of course not, I changed it a minute ago.

My first idea was to rename the project again to “DatabaseAdventure”. Visual Studio asked me to change the database in localDB as well. I said yes hoping it would rollback everything. Not only did it change the database names with the database prefix but also the project settings. I’m fine with the project settings but not the database changes.

Changing the name of the database in SSOX (SQL Server Object Explorer) back to normal (who wants their database named DatabaseAdventureWorks anyway? We know it’s a database!);¬†Visual Studio did not ask me to change the project settings.

I have the impression that settings between project settings, SSOX and Solution Explorer are not automatically updated. Also building the project does not help.

If anyone has some good advice or a workaround, shoot!