Skip to content

Commit d8b7691

Browse files
JoeRobichgithub-actions
authored and
github-actions
committed
Ignore preview versions when locating the .NET runtime.
1 parent d913122 commit d8b7691

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Diff for: src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionApi.ts

+7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@
55

66
// Contains APIs defined by the vscode-dotnet-runtime extension
77

8+
/**
9+
* https://github.com/dotnet/vscode-dotnet-runtime/blob/main/vscode-dotnet-runtime-library/src/IDotnetAcquireResult.ts
10+
*/
811
export interface IDotnetAcquireResult {
912
dotnetPath: string;
1013
}
1114

15+
/**
16+
* https://github.com/dotnet/vscode-dotnet-runtime/blob/main/vscode-dotnet-runtime-library/src/IDotnetFindPathContext.ts
17+
*/
1218
export interface IDotnetFindPathContext {
1319
acquireContext: IDotnetAcquireContext;
1420
versionSpecRequirement: DotnetVersionSpecRequirement;
21+
rejectPreviews?: boolean;
1522
}
1623

1724
/**

Diff for: src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver {
5151
mode: 'runtime',
5252
},
5353
versionSpecRequirement: 'greater_than_or_equal',
54+
// Reject previews because we are not setting `DOTNET_ROLL_FORWARD_TO_PRERELEASE` when starting the server.
55+
rejectPreviews: true,
5456
};
5557
let acquireResult = await vscode.commands.executeCommand<IDotnetAcquireResult | undefined>(
5658
'dotnet.findPath',

0 commit comments

Comments
 (0)