【问题标题】:Microsoft.SqlServer.SqlTools.VSIntegration reference problem/oddities in Visual Studio 2010Visual Studio 2010 中的 Microsoft.SqlServer.SqlTools.VSIntegration 参考问题/怪事
【发布时间】:2010-11-14 22:36:48
【问题描述】:

SQL Server 版本:2008 企业版 Visual Studio:2010 w/.NET 4.0

SSMS 2008 Addin - Data Scripter CodePlex 上的项目源代码参考 Microsoft.SqlServer.SqlTools.VSIntegration.dll

我在
<<Microsoft SQL Server install location>>\100\Tools\Binn\VSShell\Common7\IDE

下引用了 DLL

但奇怪的是。 Microsoft.SqlServer.SqlTools.VSIntegration.dll 包含一个命名空间Microsoft.SqlServer.Management.UI.VSIntegration,而该命名空间又包含ServiceCache(公共密封)。

只要我添加了引用,ServiceCache 就会突出显示(意味着没有引用问题) 但是当我编译项目时出现问题,VS 2010 抛出找不到ServiceCache的错误。

当前上下文中不存在名称“ServiceCache”

为什么 ServiceCache 在编译期间不可见,但在添加程序集后似乎立即可用?

Reflector 确实表明 ServiceCache 是项目引用的程序集的一部分,但 Visual Studio 智能感知无法显示它。

有人遇到过这种问题吗?

[更新]一些截图

反射器清楚地显示ServiceCache

但是 Visual Studio 2010 说,否则...

【问题讨论】:

  • 嗨,你设法让它在我的意思是插件工作

标签: sql-server visual-studio ssms assembly-resolution


【解决方案1】:

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

【讨论】:

  • 非常感谢约翰...这是非常糟糕的记录。
猜你喜欢
  • 2012-12-21
  • 2011-05-17
  • 2011-12-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-01-27
  • 1970-01-01
相关资源
最近更新 更多