@@ -14,7 +14,10 @@ import { CSharpExtensionId } from '../constants/csharpExtensionId';
14
14
import { readFile } from 'fs/promises' ;
15
15
import { IDotnetAcquireResult , IDotnetFindPathContext } from './dotnetRuntimeExtensionApi' ;
16
16
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 } ` ;
18
21
19
22
/**
20
23
* 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 {
104
107
* @returns The path to the .NET runtime
105
108
*/
106
109
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 } ` ;
110
113
let status = await vscode . commands . executeCommand < IDotnetAcquireResult > ( 'dotnet.acquireStatus' , {
111
114
version : dotnetAcquireVersion ,
112
115
requestingExtensionId : CSharpExtensionId ,
0 commit comments