3

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

4

1 回答 1

5

您必须添加对“C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ObjectExplorer.dll”的引用

于 2011-05-12T16:37:29.213 回答