Skip to content

Commit eceb573

Browse files
authored
Merge pull request #7773 from dibarbet/patch_prerelease
(Prerelease) Fix .NET acquisition
2 parents 769ccbd + eed8721 commit eceb573

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lsptoolshost/dotnetRuntimeExtensionResolver.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,18 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver {
105105
return this.hostInfo;
106106
}
107107

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

115118
status = await vscode.commands.executeCommand<IDotnetAcquireResult>('dotnet.acquire', {
116-
version: DotNetRuntimeVersion,
119+
version: dotnetAcquireVersion,
117120
requestingExtensionId: CSharpExtensionId,
118121
});
119122
if (!status?.dotnetPath) {

0 commit comments

Comments
 (0)