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:
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, List
1& 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?
