Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop database project from building

I am using VS2010 premium, and I have a database project in my solution. I am only using this to store SP & function scripts, so that I can keep them in TFS and execute them against our dev DB.

So, I have edited the solution configuration to not build the project, which is working as the build output shows:

------ Skipped Rebuild All: Project: SocratesApplicationDB, Configuration: Debug Any CPU ------ Project not selected to build for this solution configuration 
========== Rebuild All: 15 succeeded, 0 failed, 1 skipped ==========

But, because I don't have any of the referenced tables etc, I still get a shed-load of SQL03118 and SQL04151 errors/warnings which makes it difficult to find any 'real' errors/warnings.

Does anybody know how to make VS totally ignore my database project and to not try to validate anything (apart from dropping it from my solution)?

like image 585
DeanOC Avatar asked Aug 26 '11 00:08

DeanOC


1 Answers

If you right click on the project file in Solution Explorer and click on "Unload Project" (It's near the bottom) then it will leave the project as referenced in the solution, but it will no longer try to build it or reference any errors/warnings/messages from the project.

Also, a lot of warnings tend to come from the files that you have open in visual studio tabs (it tried to intellisense compile them and such and such), so try right clicking on your current file tab and "close all but this". This isn't necessary after you've unloaded a project though, because it will close all of them anyway.

In order to get the project back in your solution, just right click it a "Reload Project" when you're ready.

like image 144
DevinB Avatar answered Sep 30 '22 16:09

DevinB