Skip to content

Commit 0373ca2

Browse files
authored
Merge pull request #6856 from dotnet/main
Merge main into feature/net8
2 parents 6778be9 + e9f0a13 commit 0373ca2

File tree

8 files changed

+59
-73
lines changed

8 files changed

+59
-73
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
55

66
## Latest
7-
* Update Roslyn to 4.10.0-2.24081.2 (PR: [#6831](https://github.com/dotnet/vscode-csharp/pull/6831))
7+
* Update Roslyn to 4.10.0-2.24102.11 (PR: [#6847](https://github.com/dotnet/vscode-csharp/pull/6847))
8+
* Fix another issue loading .NET projects when only the 6.0 SDK is installed (PR: [#71881](https://github.com/dotnet/roslyn/pull/71881))
9+
* Fix request info leak when project loading is cancelled (PR: [#71737](https://github.com/dotnet/roslyn/pull/71737))
810
* Load Roslyn DevKit assemblies into the default ALC (PR: [#71807](https://github.com/dotnet/roslyn/pull/71807))
911

1012
## 2.16.24

l10n/bundle.l10n.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"Cannot load Razor language server because the directory was not found: '{0}'": "Cannot load Razor language server because the directory was not found: '{0}'",
4949
"Could not find '{0}' in or above '{1}'.": "Could not find '{0}' in or above '{1}'.",
5050
"Invalid razor.server.trace setting. Defaulting to '{0}'": "Invalid razor.server.trace setting. Defaulting to '{0}'",
51-
"Could not find Razor Language Server executable within directory '{0}'": "Could not find Razor Language Server executable within directory '{0}'",
51+
"Could not find Razor Language Server executable '{0}' within directory": "Could not find Razor Language Server executable '{0}' within directory",
5252
"Server failed to start after retrying 5 times.": "Server failed to start after retrying 5 times.",
5353
"Razor Language Server failed to start unexpectedly, please check the 'Razor Log' and report an issue.": "Razor Language Server failed to start unexpectedly, please check the 'Razor Log' and report an issue.",
5454
"Tried to send requests while server is not started.": "Tried to send requests while server is not started.",

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838
},
3939
"defaults": {
40-
"roslyn": "4.10.0-2.24081.2",
40+
"roslyn": "4.10.0-2.24102.11",
4141
"omniSharp": "1.39.11",
4242
"razor": "7.0.0-preview.23627.2",
4343
"razorOmnisharp": "7.0.0-preview.23363.1",
@@ -452,7 +452,7 @@
452452
{
453453
"id": "Debugger",
454454
"description": ".NET Core Debugger (Windows / x64)",
455-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-9-1/coreclr-debug-win7-x64.zip",
455+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-18-0/coreclr-debug-win7-x64.zip",
456456
"installPath": ".debugger/x86_64",
457457
"platforms": [
458458
"win32"
@@ -462,12 +462,12 @@
462462
"arm64"
463463
],
464464
"installTestPath": "./.debugger/x86_64/vsdbg-ui.exe",
465-
"integrity": "C708DDC65998BDB634AA895886B13DAD60639B53B31C8AD5E94E9DF50C7F2D56"
465+
"integrity": "9BDAF86ED83697B24AB2DF2943BA17077D2760742622184EE947653EB4FE54FE"
466466
},
467467
{
468468
"id": "Debugger",
469469
"description": ".NET Core Debugger (Windows / ARM64)",
470-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-9-1/coreclr-debug-win10-arm64.zip",
470+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-18-0/coreclr-debug-win10-arm64.zip",
471471
"installPath": ".debugger/arm64",
472472
"platforms": [
473473
"win32"
@@ -476,12 +476,12 @@
476476
"arm64"
477477
],
478478
"installTestPath": "./.debugger/arm64/vsdbg-ui.exe",
479-
"integrity": "514A9F94AE0EE403761C4263E208DFDE4F9CAD62B2B7DBF7B4B16ACB6C95E0D2"
479+
"integrity": "B4B61AF13AD8BE13C79909A25943F91F2CD199664809D50C0827565DC7680BD5"
480480
},
481481
{
482482
"id": "Debugger",
483483
"description": ".NET Core Debugger (macOS / x64)",
484-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-9-1/coreclr-debug-osx-x64.zip",
484+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-18-0/coreclr-debug-osx-x64.zip",
485485
"installPath": ".debugger/x86_64",
486486
"platforms": [
487487
"darwin"
@@ -495,12 +495,12 @@
495495
"./vsdbg"
496496
],
497497
"installTestPath": "./.debugger/x86_64/vsdbg-ui",
498-
"integrity": "3D167961816743C020FEF3968DD938596248448B7AB579A7E497C80AA84E5FF5"
498+
"integrity": "B9243B352670971BADD6065F0BB7F0D0CEE25DF90204DD59261E0B7015345D7A"
499499
},
500500
{
501501
"id": "Debugger",
502502
"description": ".NET Core Debugger (macOS / arm64)",
503-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-9-1/coreclr-debug-osx-arm64.zip",
503+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-18-0/coreclr-debug-osx-arm64.zip",
504504
"installPath": ".debugger/arm64",
505505
"platforms": [
506506
"darwin"
@@ -513,12 +513,12 @@
513513
"./vsdbg"
514514
],
515515
"installTestPath": "./.debugger/arm64/vsdbg-ui",
516-
"integrity": "1F8CC782964860B3869D6EE30E33314BB4235568C4B676A9E30E16659073C172"
516+
"integrity": "D4247872C14C8132F754433D317184C9E0EDEB2EB11384C2150D0484E863FBA7"
517517
},
518518
{
519519
"id": "Debugger",
520520
"description": ".NET Core Debugger (linux / ARM)",
521-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-9-1/coreclr-debug-linux-arm.zip",
521+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-18-0/coreclr-debug-linux-arm.zip",
522522
"installPath": ".debugger",
523523
"platforms": [
524524
"linux"
@@ -531,12 +531,12 @@
531531
"./vsdbg"
532532
],
533533
"installTestPath": "./.debugger/vsdbg-ui",
534-
"integrity": "FAADDFD23CB8285F63BA3E5F7C9190016BD95F234B139D0C54A4E87C2AA526AC"
534+
"integrity": "746389412FCCEA63DB193A0E0474B17C6B06DE819348470851AA4F168E9FA970"
535535
},
536536
{
537537
"id": "Debugger",
538538
"description": ".NET Core Debugger (linux / ARM64)",
539-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-9-1/coreclr-debug-linux-arm64.zip",
539+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-18-0/coreclr-debug-linux-arm64.zip",
540540
"installPath": ".debugger",
541541
"platforms": [
542542
"linux"
@@ -549,12 +549,12 @@
549549
"./vsdbg"
550550
],
551551
"installTestPath": "./.debugger/vsdbg-ui",
552-
"integrity": "1C160B16917633B67E8E5531CA1D2055591294AF4809DC3D9B7E9EBE63E6F8B0"
552+
"integrity": "29D3407CEA0F789820CB47D9A3B112A8C50D674F4E6A91A8C1E145F3C054E605"
553553
},
554554
{
555555
"id": "Debugger",
556556
"description": ".NET Core Debugger (linux musl / x64)",
557-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-9-1/coreclr-debug-linux-musl-x64.zip",
557+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-18-0/coreclr-debug-linux-musl-x64.zip",
558558
"installPath": ".debugger",
559559
"platforms": [
560560
"linux-musl"
@@ -567,12 +567,12 @@
567567
"./vsdbg"
568568
],
569569
"installTestPath": "./.debugger/vsdbg-ui",
570-
"integrity": "C0E5556157F9FD7CD1EA8C45279B9C89E7D723687ACADEF617070A66DCE2FFFF"
570+
"integrity": "2EA7A92AF540F2302FA9620FB9B3E97BF9682C2F164196956AB0360434F63958"
571571
},
572572
{
573573
"id": "Debugger",
574574
"description": ".NET Core Debugger (linux musl / ARM64)",
575-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-9-1/coreclr-debug-linux-musl-arm64.zip",
575+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-18-0/coreclr-debug-linux-musl-arm64.zip",
576576
"installPath": ".debugger",
577577
"platforms": [
578578
"linux-musl"
@@ -585,12 +585,12 @@
585585
"./vsdbg"
586586
],
587587
"installTestPath": "./.debugger/vsdbg-ui",
588-
"integrity": "D296C7AD188653700A10A1CA6434DFD76F6BBF2D21150AC4F27B60C4229C4FFF"
588+
"integrity": "6A237680134BA11A97FF5DCD4F5AD9D66A2188A26DD8C852C5114A8FAF4B0B5F"
589589
},
590590
{
591591
"id": "Debugger",
592592
"description": ".NET Core Debugger (linux / x64)",
593-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-9-1/coreclr-debug-linux-x64.zip",
593+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-18-0/coreclr-debug-linux-x64.zip",
594594
"installPath": ".debugger",
595595
"platforms": [
596596
"linux"
@@ -603,7 +603,7 @@
603603
"./vsdbg"
604604
],
605605
"installTestPath": "./.debugger/vsdbg-ui",
606-
"integrity": "010809D73F35BB37BF851628D79FDBC77F378D4B84FD7DA400AECD9E09FD86E4"
606+
"integrity": "285D119C936F4822376E722B088C7F6EBC19A67EB140D81F929E6206820B79B6"
607607
},
608608
{
609609
"id": "Razor",
@@ -5691,4 +5691,4 @@
56915691
}
56925692
]
56935693
}
5694-
}
5694+
}

src/lsptoolshost/dotnetRuntimeExtensionResolver.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as semver from 'semver';
99
import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation';
1010
import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver';
1111
import { PlatformInformation } from '../shared/platform';
12-
import { commonOptions } from '../shared/options';
12+
import { commonOptions, languageServerOptions } from '../shared/options';
1313
import { existsSync } from 'fs';
1414
import { CSharpExtensionId } from '../constants/csharpExtensionId';
1515
import { getDotnetInfo } from '../shared/utils/getDotnetInfo';
@@ -67,6 +67,25 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver {
6767
throw new Error(`Cannot find dotnet path '${dotnetExecutablePath}'`);
6868
}
6969

70+
// Take care to always run .NET processes on the runtime that we intend.
71+
// The dotnet.exe we point to should not go looking for other runtimes.
72+
const env: NodeJS.ProcessEnv = { ...process.env };
73+
env.DOTNET_ROOT = path.dirname(dotnetExecutablePath);
74+
env.DOTNET_MULTILEVEL_LOOKUP = '0';
75+
// Save user's DOTNET_ROOT env-var value so server can recover the user setting when needed
76+
env.DOTNET_ROOT_USER = process.env.DOTNET_ROOT ?? 'EMPTY';
77+
78+
if (languageServerOptions.crashDumpPath) {
79+
// Enable dump collection
80+
env.DOTNET_DbgEnableMiniDump = '1';
81+
// Collect heap dump
82+
env.DOTNET_DbgMiniDumpType = '2';
83+
// Collect crashreport.json with additional thread and stack frame information.
84+
env.DOTNET_EnableCrashReport = '1';
85+
// The dump file name format is <executable>.<pid>.dmp
86+
env.DOTNET_DbgMiniDumpName = path.join(languageServerOptions.crashDumpPath, '%e.%p.dmp');
87+
}
88+
7089
return {
7190
version: '' /* We don't need to know the version - we've already downloaded the correct one */,
7291
path: dotnetExecutablePath,

src/lsptoolshost/roslynLanguageServer.ts

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -491,30 +491,10 @@ export class RoslynLanguageServer {
491491
const serverPath = getServerPath(platformInfo);
492492

493493
const dotnetInfo = await hostExecutableResolver.getHostExecutableInfo();
494-
const dotnetRuntimePath = path.dirname(dotnetInfo.path);
495494
const dotnetExecutablePath = dotnetInfo.path;
496495

497496
_channel.appendLine('Dotnet path: ' + dotnetExecutablePath);
498497

499-
// Take care to always run .NET processes on the runtime that we intend.
500-
// The dotnet.exe we point to should not go looking for other runtimes.
501-
const env: NodeJS.ProcessEnv = { ...process.env };
502-
env.DOTNET_ROOT = dotnetRuntimePath;
503-
env.DOTNET_MULTILEVEL_LOOKUP = '0';
504-
// Save user's DOTNET_ROOT env-var value so server can recover the user setting when needed
505-
env.DOTNET_ROOT_USER = process.env.DOTNET_ROOT ?? 'EMPTY';
506-
507-
if (languageServerOptions.crashDumpPath) {
508-
// Enable dump collection
509-
env.DOTNET_DbgEnableMiniDump = '1';
510-
// Collect heap dump
511-
env.DOTNET_DbgMiniDumpType = '2';
512-
// Collect crashreport.json with additional thread and stack frame information.
513-
env.DOTNET_EnableCrashReport = '1';
514-
// The dump file name format is <executable>.<pid>.dmp
515-
env.DOTNET_DbgMiniDumpName = path.join(languageServerOptions.crashDumpPath, '%e.%p.dmp');
516-
}
517-
518498
let args: string[] = [];
519499

520500
if (commonOptions.waitForDebugger) {
@@ -557,7 +537,7 @@ export class RoslynLanguageServer {
557537
const csharpDevKitArgs = this.getCSharpDevKitExportArgs();
558538
args = args.concat(csharpDevKitArgs);
559539

560-
await this.setupDevKitEnvironment(env, csharpDevkitExtension);
540+
await this.setupDevKitEnvironment(dotnetInfo.env, csharpDevkitExtension);
561541
} else {
562542
// C# Dev Kit is not installed - continue C#-only activation.
563543
_channel.appendLine('Activating C# standalone...');
@@ -580,7 +560,7 @@ export class RoslynLanguageServer {
580560
const cpOptions: cp.SpawnOptionsWithoutStdio = {
581561
detached: true,
582562
windowsHide: true,
583-
env: env,
563+
env: dotnetInfo.env,
584564
};
585565

586566
if (serverPath.endsWith('.dll')) {

src/razor/src/extension.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,11 @@ export async function activate(
9090
);
9191

9292
const dotnetInfo = await hostExecutableResolver.getHostExecutableInfo();
93-
const dotnetRuntimePath = path.dirname(dotnetInfo.path);
94-
95-
// Take care to always run .NET processes on the runtime that we intend.
96-
// The dotnet.exe we point to should not go looking for other runtimes.
97-
const env: NodeJS.ProcessEnv = { ...process.env };
98-
env.DOTNET_ROOT = dotnetRuntimePath;
99-
env.DOTNET_MULTILEVEL_LOOKUP = '0';
100-
// Save user's DOTNET_ROOT env-var value so server can recover the user setting when needed
101-
env.DOTNET_ROOT_USER = process.env.DOTNET_ROOT ?? 'EMPTY';
10293

10394
let telemetryExtensionDllPath = '';
10495
// Set up DevKit environment for telemetry
10596
if (csharpDevkitExtension) {
106-
await setupDevKitEnvironment(env, csharpDevkitExtension, logger);
97+
await setupDevKitEnvironment(dotnetInfo.env, csharpDevkitExtension, logger);
10798

10899
const telemetryExtensionPath = path.join(
109100
util.getExtensionPath(),
@@ -121,7 +112,7 @@ export async function activate(
121112
razorTelemetryReporter,
122113
vscodeTelemetryReporter,
123114
telemetryExtensionDllPath,
124-
env,
115+
dotnetInfo.env,
125116
dotnetInfo.path,
126117
logger
127118
);

src/razor/src/razorLanguageServerOptionsResolver.ts

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,17 @@ export function resolveRazorLanguageServerOptions(
3535
}
3636

3737
function findLanguageServerExecutable(withinDir: string) {
38-
const extension = isWindows() ? '.exe' : '';
39-
const executablePath = path.join(withinDir, `rzls${extension}`);
40-
let fullPath = '';
41-
42-
if (fs.existsSync(executablePath)) {
43-
fullPath = executablePath;
44-
} else {
45-
// Exe doesn't exist.
46-
const dllPath = path.join(withinDir, 'rzls.dll');
47-
48-
if (!fs.existsSync(dllPath)) {
49-
throw new Error(
50-
vscode.l10n.t("Could not find Razor Language Server executable within directory '{0}'", withinDir)
51-
);
52-
}
38+
// Prefer using executable over fallback to dll.
39+
const fileName = isWindows() ? 'rzls.exe' : 'rzls';
40+
let fullPath = path.join(withinDir, fileName);
41+
if (!fs.existsSync(fullPath)) {
42+
fullPath = path.join(withinDir, 'rzls.dll');
43+
}
5344

54-
fullPath = dllPath;
45+
if (!fs.existsSync(fullPath)) {
46+
throw new Error(
47+
vscode.l10n.t("Could not find Razor Language Server executable '{0}' within directory", fullPath)
48+
);
5549
}
5650

5751
return fullPath;

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "2.17",
3+
"version": "2.18",
44
"publicReleaseRefSpec": [
55
"^refs/heads/release$",
66
"^refs/heads/main$",

0 commit comments

Comments
 (0)