From b60cfc64e131e4005078f9cdcd7aeff81d619222 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 22 Mar 2017 16:40:32 -0700 Subject: [PATCH] Fix #599: SSASCMDLETS module cannot be loaded This change fixes an issue where SQL's SSASCMDLETS module cannot be loaded into the interactive console because the host currently has a pre-1.0 version number. For now we will fix this by reporting our version as 1.0 since we're pretty close to 1.0 anyway. --- src/session.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/session.ts b/src/session.ts index b1be15fc09..625215f76a 100644 --- a/src/session.ts +++ b/src/session.ts @@ -87,12 +87,17 @@ export class SessionManager { this.isWindowsOS = os.platform() == "win32"; // Get the current version of this extension - this.hostVersion = - vscode - .extensions - .getExtension("ms-vscode.PowerShell") - .packageJSON - .version; + // NOTE: Report the host version as 1.0.0 for now to avoid + // issues loading the SSASCMDLETS module from SQL Server + // Analytics Service. Once we ship 1.0 of the extension, + // this will be changed back to the actual ext version. + // (part of a fix for PowerShell/vscode-powershell#599). + this.hostVersion = "1.0.0"; + // vscode + // .extensions + // .getExtension("ms-vscode.PowerShell") + // .packageJSON + // .version; // Fix the host version so that PowerShell can consume it. // This is needed when the extension uses a prerelease