@@ -14,7 +14,10 @@ import { CSharpExtensionId } from '../constants/csharpExtensionId';
1414import { readFile } from 'fs/promises' ;
1515import { IDotnetAcquireResult , IDotnetFindPathContext } from './dotnetRuntimeExtensionApi' ;
1616
17- export const DotNetRuntimeVersion = '8.0.10' ;
17+ const DotNetMajorVersion = '8' ;
18+ const DotNetMinorVersion = '0' ;
19+ const DotNetPatchVersion = '10' ;
20+ export const DotNetRuntimeVersion = `${ DotNetMajorVersion } .${ DotNetMinorVersion } .${ DotNetPatchVersion } ` ;
1821
1922/**
2023 * Resolves the dotnet runtime for a server executable from given options and the dotnet runtime VSCode extension.
@@ -104,9 +107,9 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver {
104107 * @returns The path to the .NET runtime
105108 */
106109 private async acquireRuntime ( ) : Promise < IDotnetAcquireResult > {
107- // We have to use '8.0' here because the runtme extension doesn't support acquiring patch versions .
108- // The acquisition will always acquire the latest however, so it will be at least 8.0.10 .
109- const dotnetAcquireVersion = '8.0' ;
110+ // The runtime extension doesn't support specifying a patch versions in the acquire API, so we only use major.minor here .
111+ // That is generally OK, as acquisition will always acquire the latest patch version .
112+ const dotnetAcquireVersion = ` ${ DotNetMajorVersion } . ${ DotNetMinorVersion } ` ;
110113 let status = await vscode . commands . executeCommand < IDotnetAcquireResult > ( 'dotnet.acquireStatus' , {
111114 version : dotnetAcquireVersion ,
112115 requestingExtensionId : CSharpExtensionId ,
0 commit comments