From 1fa00e9d96c75f6c76ec4948c0bc16a9d90c9e8c Mon Sep 17 00:00:00 2001 From: David Barbet Date: Wed, 23 Apr 2025 17:15:11 -0700 Subject: [PATCH 1/2] Log runtime mode acquired --- .../dotnetRuntime/dotnetRuntimeExtensionResolver.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts index 43cf177588..e61ee780a7 100644 --- a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts +++ b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts @@ -36,7 +36,7 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver { * This is a function instead of a string because the server path can change while the extension is active (when the option changes). */ private getServerPath: (platform: PlatformInformation) => string, - private channel: vscode.OutputChannel, + private channel: vscode.LogOutputChannel, private extensionPath: string ) {} @@ -51,7 +51,7 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver { // If we're using devkit, acquire aspnetcore as well - this avoids two separate acquisitions (devkit requires aspnetcore). const runtimeMode: DotnetInstallMode = usingDevkit ? 'aspnetcore' : 'runtime'; - this.channel.appendLine(`Locating .NET runtime version ${DotNetRuntimeVersion}`); + this.channel.info(`Locating .NET runtime version ${DotNetRuntimeVersion} with mode ${runtimeMode}`); const extensionArchitecture = (await this.getArchitectureFromTargetPlatform()) ?? process.arch; const findPathRequest: IDotnetFindPathContext = { acquireContext: { @@ -69,7 +69,7 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver { findPathRequest ); if (acquireResult === undefined) { - this.channel.appendLine( + this.channel.info( `Did not find .NET ${DotNetRuntimeVersion} on path, falling back to acquire runtime via ${DotNetRuntimeExtensionId}` ); acquireResult = await this.acquireDotNetProcessDependencies(runtimeMode); @@ -158,7 +158,7 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver { const vsixManifestFile = path.join(this.extensionPath, '.vsixmanifest'); if (!existsSync(vsixManifestFile)) { // This is not an error as normal development F5 builds do not generate a .vsixmanifest file. - this.channel.appendLine( + this.channel.warn( `Unable to find extension target platform - no vsix manifest file exists at ${vsixManifestFile}` ); return undefined; From 4475e6e4508998716f9c0ee87a4e1e2e596b89ce Mon Sep 17 00:00:00 2001 From: David Barbet Date: Wed, 23 Apr 2025 17:38:48 -0700 Subject: [PATCH 2/2] check if installing runtime works --- .../dotnetRuntime/dotnetRuntimeExtensionResolver.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts index e61ee780a7..830fbc163d 100644 --- a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts +++ b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts @@ -19,7 +19,6 @@ import { IDotnetFindPathContext, } from './dotnetRuntimeExtensionApi'; import { DotNetRuntimeExtensionId } from '../../checkDotNetRuntimeExtensionVersion'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; const DotNetMajorVersion = '9'; const DotNetMinorVersion = '0'; @@ -47,9 +46,10 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver { return this.hostInfo; } - const usingDevkit = getCSharpDevKit() !== undefined; + //const usingDevkit = getCSharpDevKit() !== undefined; // If we're using devkit, acquire aspnetcore as well - this avoids two separate acquisitions (devkit requires aspnetcore). - const runtimeMode: DotnetInstallMode = usingDevkit ? 'aspnetcore' : 'runtime'; + //const runtimeMode: DotnetInstallMode = usingDevkit ? 'aspnetcore' : 'runtime'; + const runtimeMode = 'runtime'; this.channel.info(`Locating .NET runtime version ${DotNetRuntimeVersion} with mode ${runtimeMode}`); const extensionArchitecture = (await this.getArchitectureFromTargetPlatform()) ?? process.arch;