Skip to content

Commit 253028d

Browse files
committed
Require newest version of .net runtime extension
1 parent 132553a commit 253028d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/lsptoolshost/dotnetRuntimeExtensionResolver.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ import { CSharpExtensionId } from '../constants/csharpExtensionId';
1414
import { readFile } from 'fs/promises';
1515
import { 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,

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export async function activate(
8484
}
8585

8686
const dotnetRuntimeExtensionId = 'ms-dotnettools.vscode-dotnet-runtime';
87-
const requiredDotnetRuntimeExtensionVersion = '2.2.2';
87+
const requiredDotnetRuntimeExtensionVersion = '2.2.3';
8888

8989
const dotnetRuntimeExtension = vscode.extensions.getExtension(dotnetRuntimeExtensionId);
9090
const dotnetRuntimeExtensionVersion = dotnetRuntimeExtension?.packageJSON.version;

0 commit comments

Comments
 (0)