Skip to content

Commit

Permalink
Merge pull request #7774 from dibarbet/patch_release
Browse files Browse the repository at this point in the history
(Release) Fix .NET acquisition
  • Loading branch information
dibarbet authored Nov 13, 2024
2 parents 78595d7 + cc45ccb commit 6ca2cfa
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 6ca2cfa

Please sign in to comment.