“Microsoft.DataWarehouse.Interfaces, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”的引用
2010-04-30 09:18
423 查看
通过VS访问Cube中的数据挖掘模型,注意程序集的引用。
错误 1 类型“Microsoft.DataWarehouse.Interfaces.IMiningModelViewerControl2”在未被引用的程序集中定义。必须添加对程序集“Microsoft.DataWarehouse.Interfaces, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”的引用。 D:\My Documents\C# Programming\WindowsApplication3\WindowsApplication3\Form1.Designer.cs 65 63 WindowsApplication3
解决办法:把D:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.DataWarehouse.Interfaces.dll
拷贝到D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\Microsoft.DataWarehouse.Interfaces.dll
后台完整代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.AnalysisServices.Viewers;
using Microsoft.DataWarehouse.Interfaces;
namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.treeViewer1.ConnectionString = "Provider=MSOLAP.3;Data Source=sxf;Integrated Security=SSPI;Initial Catalog=Adventure Works DW;";
this.treeViewer1.MiningModelName = "TM Decision Tree";
this.treeViewer1.LoadViewerData(string.Empty);
}
}
}
结果如图
错误 1 类型“Microsoft.DataWarehouse.Interfaces.IMiningModelViewerControl2”在未被引用的程序集中定义。必须添加对程序集“Microsoft.DataWarehouse.Interfaces, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”的引用。 D:\My Documents\C# Programming\WindowsApplication3\WindowsApplication3\Form1.Designer.cs 65 63 WindowsApplication3
解决办法:把D:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.DataWarehouse.Interfaces.dll
拷贝到D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\Microsoft.DataWarehouse.Interfaces.dll
后台完整代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.AnalysisServices.Viewers;
using Microsoft.DataWarehouse.Interfaces;
namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.treeViewer1.ConnectionString = "Provider=MSOLAP.3;Data Source=sxf;Integrated Security=SSPI;Initial Catalog=Adventure Works DW;";
this.treeViewer1.MiningModelName = "TM Decision Tree";
this.treeViewer1.LoadViewerData(string.Empty);
}
}
}
结果如图
![](https://oscdn.geek-share.com/Uploads/Images/Content/202009/14/fb95dc5bc82dfd80bff7f1b13e77c887.jpg)
相关文章推荐
- 所生成项目的处理器架构“MSIL”与引用“Microsoft.AspNet.Scaffolding.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86”的处理器架构“x86”不匹配。
- 编译器错误消息: CS0012: 类型“System.Data.Linq.DataContext”在未被引用的程序集中定义。必须添加对程序集“System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”的引用。
- 未能加载文件或程序集Office, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
- 错误 1 未能找到 CodeDom 提供程序类型“Microsoft.VJSharp.VJSharpCodeProvider, VJSharpCodeProvider, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
- 未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7
- 必须添加对程序集“EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”的引用。
- 未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项
- 类型“System.Data.SQLite.SQLiteParameter”在未被引用的程序集中定义。必须添加对程序集“System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139”的引用
- 无法添加数据库未能加载文件或程序集“Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral,PublicKeyToken=89845dcd8080c
- Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e94
- 未能加载文件或程序集“Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。
- 未能加载文件或程序集“Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral
- 未能加载文件或程序集"Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad
- 如何解决如"未能加载文件或程序集“Microsoft.Practices.EnterpriseLibrary.Data, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或
- 未能加载文件或程序集“Microsoft.SqlServer.Sqm, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc
- <add assembly="Microsoft.Office.Tools.Word, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F
- 未能加载文件或程序集:Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”错误
- 安装SharePoint2010出现“Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ”的解决方法
- 未能加载文件或程序集“Microsoft.SqlServer.Management.Sdk.Sfc, Version=11.0.0.0, Culture=neutral, PublicKeyToken
- “未能从程序集“Microsoft.VisualStudio.DataDesign.SyncDesigner.DslPackage, Version=9.0.0.0, Culture=neutral...”的解决办法