VegardKT
VegardKT

Reputation: 1246

Method not found: Microsoft.AnalysisServices

I have created an ETL setup for a datawarehouse with SSIS packages. Everything is working fine until the very last step which is a "Analysis Services Processing Task Editor"

Whenever I add my cube and press ok I get the following error:

"Method not found: "'Void Microsoft.AnalysisServices.Commands.ProcessCommand.set_Type(Microsoft.AnalysisServices.ProcessType)'.

I suspect there is some issue with a DLL, but I'm not sure which. I found a Microsoft.AnalysisServices.dll under my SQL Server install (C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies) I did not find it in my Visual Studio installation folders.

Upvotes: 2

Views: 8129

Answers (4)

VegardKT
VegardKT

Reputation: 1246

I was able to found a workaround.

I was trying to reproduce the problem with the AdventureWorks dataset, to verify that the problem was occuring due to the .dll and not my cube or anything else.

So I created a new OLTP & DWH with Cube from the AdventureWorks dataset and created a new SSIS project where the only step was to process the cube.

With this setup I did not get the same error as I did on the original project, seemingly, there was nothing wrong with the .dll?

However I also tried changing the target server and cube to my original one, and to my surprise it worked!

So i saved that package and imported it into my original project and excecuted the package from there and it works.

EDIT: Please also see Pavel's possbile solution.

Strange thing, if we create new SSIS project in Project deployment mode, leave 2017 version, and deploy it on our 2016 SSIS services - all is working perfectly fine. So... we just need to migrate to the Project deployment mode ))) – Pavel Botygin

Upvotes: 4

ubi
ubi

Reputation: 9

This seems to be because of a deployment version that is not supported by VS-2015 components.

  • Go to Project-> Properties
  • In Configuration Properties -> General
  • Set TargetServerVersion To SQL Server 2017

Upvotes: 0

Pavel Botygin
Pavel Botygin

Reputation: 187

We have same problem.

One interesting thing: you can try to switch your project compatibility to SQL Server vNext, then create your processing task normally, clicking OK and other stuff successfully (what a miracle it is!), then switch back to desired version and deploy.

But if you have Script Tasks in the same package - then you can try other workaround (which I'm actually using now). Use a Script Task to populate a variable (User::DimensionsProcessingCommand in my example) for the "Analysis Services Execute DDL Task". It's little complicated way, but very useful in the future.

    public void Main()
    {
        Boolean tstFire = false;
        Microsoft.AnalysisServices.Server myServer = new Microsoft.AnalysisServices.Server();
        //Get connection to SSAS database from package
        ConnectionManager myConn = Dts.Connections["SSAS"];
        //Template for future use
        String ProcessingCommandTemplate = "<Batch xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\"><Parallel>XXXXXXX</Parallel></Batch>";
        String myProcessingCommand = "";
        //Array for gathering dimensions w/o duplicates
        Dictionary<Dimension, Cube> amoDimDictionary = new Dictionary<Dimension, Cube>();

        String myServerName = myConn.ConnectionString;
        String myDatabaseName = myConn.Properties["InitialCatalog"].GetValue(myConn).ToString();
        //Connect to SSAS server instance
        myServer.Connect(myServerName);

        Database amoDb = myServer.Databases.FindByName(myDatabaseName);

        //Get all dimensions used in cubes
        foreach (Cube amoCube in amoDb.Cubes)
        {
                foreach (CubeDimension amoDimension in amoCube.Dimensions)
            {
                if (!amoDimDictionary.ContainsKey(amoDimension.Dimension))
                {
                    amoDimDictionary.Add(amoDimension.Dimension, amoCube);
                }
            }
        }

        //Start XML capture Dimensions
        myServer.CaptureXml = true;
        foreach (Dimension amoDimension in amoDimDictionary.Keys)
        {
            if (amoDimension.State == AnalysisState.Unprocessed)
            {
                amoDimension.Process(ProcessType.ProcessFull);
            }
            else
            {
                amoDimension.Process(ProcessType.ProcessUpdate);
            }
        }
        myServer.CaptureXml = false;

        //Build command
        foreach (String strXML in myServer.CaptureLog)
        {
            myProcessingCommand = myProcessingCommand + strXML.ToString();
        }

        myProcessingCommand = ProcessingCommandTemplate.Replace("XXXXXXX", myProcessingCommand);
        Dts.Variables["User::DimensionsProcessingCommand"].Value = myProcessingCommand.ToString();
        //Command output to see at runtime from VS 2015
        Dts.Events.FireInformation(1, "", Dts.Variables["User::DimensionsProcessingCommand"].Value.ToString(), "", 0, ref tstFire);

P.S. On our DEV machine are installed from scratch: SQL Server 2016, Visual Studio 2015, SSDT 17.1 When we were trying to develop some SSIS packages under SQL Server 2016 compatibility - we stumbled on so many problems... so we just stopped counting them. GAC is googled and tuned back and forth without any result. 14.0 Microsoft DEV Environment seems so buggy and... just broken if you try to create something under 13.0 and lower versions.

Upvotes: 1

Troy Witthoeft
Troy Witthoeft

Reputation: 2666

This MS Forum post has the following advice.

If it exists, cut and paste the following folder from the GAC to somewhere else.

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.AnalysisServices.DeploymentEngine

Then, rebuild the project.

  1. Right click on the project

  2. Click properties

  3. Expand Configuration Properties -> select Deployment

  4. At The Target Server : Enter \ < SSAS Instace Name> ( Make Sure the SSAS Server Is Multidimensional SSAS Instance )

  5. Click Apply

  6. Save Project. Restart the IDE ( SSDT )

  7. Start The SSDT -> Select The Project - > And Rebuilt Solution \ Rebuilt Project.

  8. Test again.

Upvotes: 0

Related Questions