Skip to content

Commit dbac654

Browse files
authored
[prerelease] Ignore preview versions when locating the .NET runtime. (#8043)
2 parents d913122 + 42a62db commit dbac654

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
* Fix file path service, and integration tests (#11556) (PR: [#11556](https://github.com/dotnet/razor/pull/11556))
1010
* Add ParserOptions and CodeGenerationOptions properties to RazorCodeDocument and rationalize options configuration (#11526) (PR: [#11526](https://github.com/dotnet/razor/pull/11526))
1111
* Fix parsing of quotes in attribute names (#11543) (PR: [#11543](https://github.com/dotnet/razor/pull/11543))
12-
* Bump xamlTools to 17.14.35828.13 (PR: [#8032](https://github.com/dotnet/vscode-csharp/pull/8032))
12+
* Bump xamlTools to 17.14.35828.13 (PR: [#8032](https://github.com/dotnet/vscode-csharp/pull/8032))
13+
* Ignore preview versions when locating the .NET runtime (PR: [#8043](https://github.com/dotnet/vscode-csharp/pull/8043))
1314

1415
# 2.67.x
1516
* Update Razor to 9.0.0-preview.25125.9 (PR: [#8027](https://github.com/dotnet/vscode-csharp/pull/8027))

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
/**

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)