Skip to content

Commit

Permalink
Merge pull request #7773 from dibarbet/patch_prerelease
Browse files Browse the repository at this point in the history
(Prerelease) Fix .NET acquisition
  • Loading branch information
dibarbet authored Nov 13, 2024
2 parents 769ccbd + eed8721 commit eceb573
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 eceb573

Please sign in to comment.