Skip to content

Commit

Permalink
Fix .NET acquisition
Browse files Browse the repository at this point in the history
  • Loading branch information
dibarbet committed Nov 13, 2024
1 parent 769ccbd commit eed8721
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lsptoolshost/dotnetRuntimeExtensionResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,18 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver {
return this.hostInfo;
}

// We have to use '8.0' here because the runtme extension doesn't support acquiring patch versions.
// The acquisition will always acquire the latest however, so it will be at least 8.0.10.
const dotnetAcquireVersion = '8.0';
let status = await vscode.commands.executeCommand<IDotnetAcquireResult>('dotnet.acquireStatus', {
version: DotNetRuntimeVersion,
version: dotnetAcquireVersion,
requestingExtensionId: CSharpExtensionId,
});
if (status === undefined) {
await vscode.commands.executeCommand('dotnet.showAcquisitionLog');

status = await vscode.commands.executeCommand<IDotnetAcquireResult>('dotnet.acquire', {
version: DotNetRuntimeVersion,
version: dotnetAcquireVersion,
requestingExtensionId: CSharpExtensionId,
});
if (!status?.dotnetPath) {
Expand Down

0 comments on commit eed8721

Please sign in to comment.