当我尝试引用Azure Analysis Service表格模型时,遇到的问题是一个例外。
Message =类型'DataSourceType'的值'2'是意外的。 来源= 堆栈跟踪: Microsoft.AnalysisServices.Tabular.ObjectFactory.CreateDataSourceFromRowset(IPropertyReader阅读器) 在Microsoft.AnalysisServices.Tabular.DdlUtil.LoadDataTable(ObjectType objectType,DataTable table,DictionaryobjectMap,StringComparerInfo comparerInfo)
我在Exception when referencing SSAS Tabular model in C#处发现了相同的问题,但没有解决方案。
Microsoft.AnalysisServices.Database db =
SSASConnection.Instance(Parent.Name).Databases.Find(Id);
if(db.Model != null) // Here it breaks!!!
答案 0 :(得分:0)
我为此找到了解决方案。
问题是我使用了Microsoft.AnalysisServices.dll 13.0.0.0版本
我将其更新为Microsoft.AnalysisServices.dll 14.0.0.0版本,现在一切正常。