开发者

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,开发者_Go百科 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)?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜