Skip to content

Commit b60cfc6

Browse files
committed
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.
1 parent c97453e commit b60cfc6

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Diff for: src/session.ts

+11-6
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,17 @@ export class SessionManager {
8787
this.isWindowsOS = os.platform() == "win32";
8888

8989
// Get the current version of this extension
90-
this.hostVersion =
91-
vscode
92-
.extensions
93-
.getExtension("ms-vscode.PowerShell")
94-
.packageJSON
95-
.version;
90+
// NOTE: Report the host version as 1.0.0 for now to avoid
91+
// issues loading the SSASCMDLETS module from SQL Server
92+
// Analytics Service. Once we ship 1.0 of the extension,
93+
// this will be changed back to the actual ext version.
94+
// (part of a fix for PowerShell/vscode-powershell#599).
95+
this.hostVersion = "1.0.0";
96+
// vscode
97+
// .extensions
98+
// .getExtension("ms-vscode.PowerShell")
99+
// .packageJSON
100+
// .version;
96101

97102
// Fix the host version so that PowerShell can consume it.
98103
// This is needed when the extension uses a prerelease

0 commit comments

Comments
 (0)