我想将 AdomdClient 引用添加到 C# 项目,但它不在引用列表中。客户端列在程序集文件夹 C:\Windows\assembly 中。
机器上安装了 SQL Server 2012。
如果您在解决方案中需要它,并且知道位置(如您所指示,在 c:\windows\assembly 中),请在 Visual Studio 的解决方案资源管理器中右键单击您的引用节点,然后单击“添加引用”。单击“浏览”按钮,找到您的 DLL 文件,然后在对话框中单击“添加”。它应该显示在您的参考列表中。然后,您应该能够在您的 C# 文件中引用它。
如果您手边没有 ADOMD 客户端 DLL 文件,请从 Microsoft SQL Server 2012 功能包 ( http://www.microsoft.com/en-us/download/details.aspx?id=29065 ) 下载它。单击“安装说明”并查找“Microsoft® SQL Server® 2012 ADOMD.NET”
On my computer, I can find the reference for SQL Server 2008 at
c:\Program Files (x86)\Microsoft SQL Server\100\DTS\PipelineComponents\Microsoft.AnalysisServices.AdomdClient.dll
For SQL Server 2012, I would assume the version (directory "100") would be higher, probably "110". The location is a bit strange, as it is meant for Integration Services data flow components, but I just checked another computer having SQL Server 2008 installed, and it has the file at the same location.
解决方案在这里。
1) 添加 Microsoft.AnalysisServices.dll 浏览到 C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.AnalysisServices.dll
2) 添加 Microsoft.AnalysisServices.AdomdClient 浏览到 C:\Program Files\Microsoft.NET\ADOMD.NET\100\Microsoft.AnalysisServices.AdomdClient.dll