Tutorial :Microsoft.SqlServer.SqlTools.VSIntegration reference problem/oddities in Visual Studio 2010


SQL Server Edition: 2008 Enterprise Visual Studio: 2010 w/ .NET 4.0

SSMS 2008 Addin - Data Scripter project source code on CodePlex references Microsoft.SqlServer.SqlTools.VSIntegration.dll

I have referenced the DLL under
<<Microsoft SQL Server install location>>\100\Tools\Binn\VSShell\Common7\IDE

But here is the oddity. Microsoft.SqlServer.SqlTools.VSIntegration.dll contains a namespace Microsoft.SqlServer.Management.UI.VSIntegration, which in turn contains ServiceCache (public sealed).

As soon as I add the reference, ServiceCache is highlighted (meaning there is no reference issue) But the problem arises when I compile the project and VS 2010 throws up an error that it cannot find ServiceCache.

The name 'ServiceCache' does not exist in the current context

Why is that ServiceCache is not visible during compile time but looks like it's available right after adding the assembly?

And Reflector does show that ServiceCache is part of the assembly that the project is referencing, but Visual Studio intellisense fails to display it.

Any had this kind of problem?

[UPDATE] Some screenshots

Reflector clearly shows ServiceCache alt text

But Visual Studio 2010 says, otherwise... alt text


You must add a reference to "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ObjectExplorer.dll"

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »