Unable To Open Tabular Cube From Azure Analysis Service With Compatibility Level 1604 In Visual Studio

63 Views Asked by At

The latest compatibility level supported by Azure Analysis Services is 1604, this is what is returned by the following C# API:

public int GetMaxCompatibilityLevel()
{
    return ssasServer.SupportedCompatibilityLevels.Split(',')
              .Where(a => a.ToCharArray().Count() == 4).Select(Int32.Parse).Max();
}

If you build(programmatically in C#) a cube in this compatibility level it works great, however if you attempt to connect to it in the latest version of Visual Studio 2022(Version 17.6.1) you will get the following error:

enter image description here

And further details:

This file cannot be opened. You can only open files that are compatible with Microsoft SQL Server 2012 SP1 or later. ---------------------------- An error occurred while opening the model on the workspace database. Reason: This file cannot be opened. You can only open files that are compatible with Microsoft SQL Server 2012 SP1 or later.

Call Stack:

at Microsoft.AnalysisServices.VSHost.VSHostManager.PrepareSandbox(Boolean newProject, Boolean& isRefreshNeeded, Boolean& isImpersonationChanged, Boolean& saveRequired, List1& truncatedTables, Boolean isRealTimeMode, Int32 clientCompatibilityLevel) ---------------------------- at Microsoft.AnalysisServices.VSHost.VSHostManager.PrepareSandbox(Boolean newProject, Boolean& isRefreshNeeded, Boolean& isImpersonationChanged, Boolean& saveRequired, List1& truncatedTables, Boolean isRealTimeMode, Int32 clientCompatibilityLevel) at Microsoft.AnalysisServices.VSHost.Integration.EditorFactory.CreateEditorInstance(UInt32 grfCreateDoc, String pszMkDocument, String pszPhysicalView, IVsHierarchy pvHier, UInt32 itemid, IntPtr punkDocDataExisting, IntPtr& ppunkDocView, IntPtr& ppunkDocData, String& pbstrEditorCaption, Guid& pguidCmdUI, Int32& pgrfCDW)

============================

This can easily be worked around by editing the "model.bim" that is pulled down, by changing the:

"compatibilityLevel": 1604

Property to 1600 you will be able to open and manipulate the cube in visual studio.

Why is this the case? Is there a easier way to work around this? Why don't they(MS) list this version on their main page?

1

There are 1 best solutions below

1
On

Check if you made a typo. Your title says level 1064 instead of 1604. The error message is indicating that it only supports 2012 or later. It's not that your version is too high. This is complaining that your version is too low. Version 1064 is before SQL Server 2012. If the version is too high, there is a different error message.

Then when you edit Model.bim, you corrected typed 1604 and it worked, as it should because this is greater than SQL Server 2012.