Referencing the Master Database from Visual Studio DBPro GDR

.NET Musings

Wandering thoughts of a developer, architect, speaker, and trainer

NAVIGATION - SEARCH

Referencing the Master Database from Visual Studio DBPro GDR

Some of the objects in my Database project that I have in VSBDPro uses sys.views, sys.schemas, and sp_executesql.  All was well until I upgraded to the GDR RTM (I had avoided the CTPs).

Then I consistently got the following error:

TSD04151: Procedure: [schema].[procname] has an unresolved reference 
	to object [dbo].[sp_executesql].


Adding a database reference either requires a DBSchema file or a project.  Problem is, you can't reverse engineer the master database.



This was a bit frustrating, as warnings in VSDBPro (even the GDR version) can make the UI grind to a halt for typing.  Thanks to Chris Barth from the Cincinnati SQL Server Users' Group  for finding the post with the solution.  To paraphrase that post:



VSDBPro GDR installs the requisite schema files in:



%ProgramFiles%\Microsoft Visual Studio 9.0\VSTSDB\Extensions\SqlServer



Look under that path for your version of SQL Server (2000, 2005, 2008)



I added the correct reference, and viola, all of the warnings went away. 



Happy Coding!

Comments (3) -

Philip Japikse, MCSD, MCDBA, CSM

Yes.

So, for noobs like me, in Solution Explorer, right click you DB solution and choose Add Database Reference...

Thanks, this helped partially. In my case the warning are within asp.net membership provider schema. Most of them gone but one is still there. Also there are few warnings of the same type for ambiguous references. Anyway, your advice did help.

Comments are closed
Managed Windows Shared Hosting by OrcsWeb