ADOMDClient throws exception in VS2015

Hi Everyone,

We are experiencing an exception while establishing connection with OfflineCube (.cub) by Microsoft.AnalysisServices.ADOMDClient assembly in following machine configuration.

Machine Configuration:

OS  - Windows10 (64 bit)

VS Version VS2015

Installed Framework Version v4.0 to v4.6 (which is installed automatically while installing VS2015)

Code Snippet:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MASAC = Microsoft.AnalysisServices.AdomdClient;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            MASAC.AdomdConnection adomdConnectionObjMain = null;
            adomdConnectionObjMain = new MASAC.AdomdConnection(@"Data Source=D:\OfflineCube\Adventure_Works_Ext.cub; Provider=MSOLAP;");
            adomdConnectionObjMain.Open();
            var temp11 = adomdConnectionObjMain;
            string temp3 = "SELECT NON EMPTY ({{Hierarchize({[Customer].[Customer Geography].[Country]})} * {[MEASURES].[Internet Sales Amount]}} )  ON COLUMNS, NON EMPTY ({{Hierarchize({[Date].[Fiscal].[Fiscal Year]})}} )  ON ROWS FROM [Adventure Works]";
            Microsoft.AnalysisServices.AdomdClient.CellSet set = new Microsoft.AnalysisServices.AdomdClient.AdomdCommand(temp3, adomdConnectionObjMain).ExecuteCellSet();
            Console.ReadLine();
            adomdConnectionObjMain.Close();
        }
    }
}

Note: Method named Open() in AdomdConnection of ADOMDClient assembly throws the exception.

Exception Message:

MessageBox with following message:

 

Could you please any one help me to avod this exception without installing .NetFramework v3.5?

Thanks and Regards...

August 28th, 2015 11:46am

Hi Narendhran,

According to your description, you have .Net Framework 4.6 installed. When you execute code using Microsoft.AnalysisServices.ADOMDClient, it still requires .Net framework 3.5. Right?

Each version of the .NET Framework contains the common language runtime (CLR). The .NET Framework 4.6 and 3.5 are using different version of CLR. Please see: .NET Framework Versions and Dependencies. It means .NET Framework 4.6 doesn't include .NET Framework 3.5. You have install the .NET Framework 3.5 on demand and enable the feature in Control Panel. Please refer to: Installing the .NET Framework 3.5 on Windows 8, Windows 8.1 and Windows 10

Regards,

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 2:55am

Hi Simon,<o:p></o:p>

<o:p> </o:p>

Thanks for your reply.<o:p></o:p>

<o:p> </o:p>

Yes, It requires .Net v3.5. But the application gives exact result as we expect even though it throws exception about installation of .Net v3.5.<o:p></o:p>

<o:p> </o:p>

Here, our question is what is the exact version of Microsoft.AnalysisServices.ADOMDClient assembly which is completely supported by .Net v4.6(VS2015) and Windows10 combination without any kind of framework related exceptions.<o:p></o:p>

<o:p> </o:p>

We have checked with all versions of ADOMDClient assembly as follows 10 (SQL Server 2008 R2), 11 (SQL Server 2012), 12 (SQL Server 2014).<o:p></o:p>

<o:p> </o:p>

Note: We dont want to install any framework manually other than the frameworks shipped with VisualStudio2015 suite.<o:p></o:p>

<o:p> </o:p>

August 31st, 2015 5:32am

Hi All,

I have tried with all versions of ADOMDClient assemblies from 9.0.x.x to latest 12.0.xx, but still experiences the same exception in message box.

The block of codes illustrated above in my first post works fine and gives required output even though framework missing exception related message box has been thrown.

Now our requirement squarely relies on, How to prevent / hide  the message box without installing .Net v3.5 ? because VS2015 suite by default has .Net frameworks from 4.0 onwards.

Let me know if you have any concern.

Free Windows Admin Tool Kit Click here and download it now
September 8th, 2015 3:39am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics