Skip to content

Commit 601f759

Browse files
committed
Merge remote-tracking branch 'upstream/main' into dotnet_from_path
2 parents 5f157e2 + c3aff7e commit 601f759

22 files changed

+322
-136
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@
99
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
1010

1111
## Latest
12+
* Change how hint diagnostics are shown so they aren't shown as blue squiggles (PR: [#69403](https://github.com/dotnet/roslyn/pull/69403))
13+
* Load projects even if there is no solution file (PR: [#6062](https://github.com/dotnet/vscode-csharp/pull/6062))
14+
* Show toast when project loading fails (PR: [#6060](https://github.com/dotnet/vscode-csharp/pull/6060))
15+
* Fix misleading lsp server logs (PR: [#69378](https://github.com/dotnet/roslyn/pull/69378))
16+
* Add support for code lens enable/disable options to roslyn LSP (PR: [#6001](https://github.com/dotnet/vscode-csharp/pull/6001))
17+
* Onboard Localization pipeline (PR: [#5990](https://github.com/dotnet/vscode-csharp/pull/5990))
18+
* Enable loading translated strings from razor TS code (PR: [#5962](https://github.com/dotnet/vscode-csharp/pull/5962))
19+
* Update typescript and eslint plugin to remove build warning (PR: [6002](https://github.com/dotnet/vscode-csharp/pull/6002))
20+
* Report how the extension was activated (PR: [#6043](https://github.com/dotnet/vscode-csharp/pull/6043))
21+
22+
## 2.0.328
1223
* Update Roslyn to 4.8.0-1.23403.6 (PR: [#6003](https://github.com/dotnet/vscode-csharp/pull/6003))
1324
* Fix issue where the ProcessFrameworkReferences task causes projects to fail to load (PR: [#69354](https://github.com/dotnet/roslyn/pull/69354))
1425
* Emulate suggestion mode in LSP completion by always soft-selecting (PR: [#69327](https://github.com/dotnet/roslyn/pull/69327))

azure-pipelines-official.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ trigger:
77
pr: none
88

99
variables:
10-
- name: prereleaseFlag
11-
value: '--prerelease'
10+
${{ if eq(variables['Build.SourceBranchName'], 'release') }}:
11+
prereleaseFlag: ''
12+
${{ else }}:
13+
prereleaseFlag: '--prerelease'
1214

1315
stages:
1416
- stage: Build

azure-pipelines.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ pr:
1414
- main
1515

1616
variables:
17-
- name: prereleaseFlag
18-
value: '--prerelease'
17+
${{ if eq(variables['Build.SourceBranchName'], 'release') }}:
18+
prereleaseFlag: ''
19+
${{ else }}:
20+
prereleaseFlag: '--prerelease'
1921

2022
stages:
2123
- stage: Build

l10n/bundle.l10n.json

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
11
{
2+
"Cannot create .NET debug configurations. No workspace folder was selected.": "Cannot create .NET debug configurations. No workspace folder was selected.",
3+
"Cannot create .NET debug configurations. The server is still initializing or has exited unexpectedly.": "Cannot create .NET debug configurations. The server is still initializing or has exited unexpectedly.",
4+
"Cannot create .NET debug configurations. The active C# project is not within folder '{0}'.": "Cannot create .NET debug configurations. The active C# project is not within folder '{0}'.",
5+
"Does not contain .NET Core projects.": "Does not contain .NET Core projects.",
6+
"No launchable target found for '{0}'": "No launchable target found for '{0}'",
7+
"Cannot resolve .NET debug configurations. The server is still initializing or has exited unexpectedly.": "Cannot resolve .NET debug configurations. The server is still initializing or has exited unexpectedly.",
8+
"'{0}' is not an executable project.": "'{0}' is not an executable project.",
9+
"Unable to determine debug settings for project '{0}'": "Unable to determine debug settings for project '{0}'",
10+
"No process was selected.": "No process was selected.",
11+
"Can't parse envFile {0} because of {1}": "Can't parse envFile {0} because of {1}",
12+
"Open envFile": "Open envFile",
13+
"Yes": "Yes",
14+
"Not Now": "Not Now",
15+
"More Information": "More Information",
16+
"The selected launch configuration is configured to launch a web browser but no trusted development certificate was found. Create a trusted self-signed certificate?": "The selected launch configuration is configured to launch a web browser but no trusted development certificate was found. Create a trusted self-signed certificate?",
17+
"Self-signed certificate sucessfully {0}": "Self-signed certificate sucessfully {0}",
18+
"Show Output": "Show Output",
19+
"Couldn't create self-signed certificate. See output for more information.": "Couldn't create self-signed certificate. See output for more information.",
20+
"No executable projects": "No executable projects",
21+
"Select the project to launch": "Select the project to launch",
22+
"Invalid project index": "Invalid project index",
23+
"Startup project not set": "Startup project not set",
24+
"Use IntelliSense to find out which attributes exist for C# debugging": "Use IntelliSense to find out which attributes exist for C# debugging",
25+
"Use hover for the description of the existing attributes": "Use hover for the description of the existing attributes",
26+
"For further information visit {0}.": "For further information visit {0}.",
27+
"If you have changed target frameworks, make sure to update the program path.": "If you have changed target frameworks, make sure to update the program path.",
28+
"Enable launching a web browser when ASP.NET Core starts. For more information: {0}": "Enable launching a web browser when ASP.NET Core starts. For more information: {0}",
29+
"For further information visit {0}": "For further information visit {0}",
30+
"For more information about the 'console' field, see {0}": "For more information about the 'console' field, see {0}",
31+
"WARNING": "WARNING",
32+
"The C# extension was unable to automatically decode projects in the current workspace to create a runnable launch.json file. A template launch.json file has been created as a placeholder.\n\nIf the server is currently unable to load your project, you can attempt to resolve this by restoring any missing project dependencies (example: run 'dotnet restore') and by fixing any reported errors from building the projects in your workspace.\nIf this allows the server to now load your project then --\n * Delete this file\n * Open the Visual Studio Code command palette (View->Command Palette)\n * run the command: '.NET: Generate Assets for Build and Debug'.\n\nIf your project requires a more complex launch configuration, you may wish to delete this configuration and pick a different template using the 'Add Configuration...' button at the bottom of this file.": "The C# extension was unable to automatically decode projects in the current workspace to create a runnable launch.json file. A template launch.json file has been created as a placeholder.\n\nIf the server is currently unable to load your project, you can attempt to resolve this by restoring any missing project dependencies (example: run 'dotnet restore') and by fixing any reported errors from building the projects in your workspace.\nIf this allows the server to now load your project then --\n * Delete this file\n * Open the Visual Studio Code command palette (View->Command Palette)\n * run the command: '.NET: Generate Assets for Build and Debug'.\n\nIf your project requires a more complex launch configuration, you may wish to delete this configuration and pick a different template using the 'Add Configuration...' button at the bottom of this file.",
33+
"Failed to parse tasks.json file": "Failed to parse tasks.json file",
34+
"Don't Ask Again": "Don't Ask Again",
35+
"Required assets to build and debug are missing from '{0}'. Add them?": "Required assets to build and debug are missing from '{0}'. Add them?",
36+
"Cancel": "Cancel",
37+
"Replace existing build and debug assets?": "Replace existing build and debug assets?",
38+
"Unable to generate assets to build and debug. {0}.": "Unable to generate assets to build and debug. {0}.",
239
"Cannot load Razor language server because the directory was not found: '{0}'": "Cannot load Razor language server because the directory was not found: '{0}'",
340
"Could not find '{0}' in or above '{1}'.": "Could not find '{0}' in or above '{1}'.",
441
"Invalid trace setting for Razor language server. Defaulting to '{0}'": "Invalid trace setting for Razor language server. Defaulting to '{0}'",
@@ -81,5 +118,30 @@
81118
"View Debug Docs": "View Debug Docs",
82119
"Ignore": "Ignore",
83120
"Run and Debug: A valid browser is not installed": "Run and Debug: A valid browser is not installed",
84-
"Restart Language Server": "Restart Language Server"
121+
"Restart Language Server": "Restart Language Server",
122+
"pipeArgs must be a string or a string array type": "pipeArgs must be a string or a string array type",
123+
"Name not defined in current configuration.": "Name not defined in current configuration.",
124+
"Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.": "Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.",
125+
"Select the process to attach to": "Select the process to attach to",
126+
"Pipe transport failed to get OS and processes.": "Pipe transport failed to get OS and processes.",
127+
"Operating system \"{0}\" not supported.": "Operating system \"{0}\" not supported.",
128+
"Transport attach could not obtain processes list.": "Transport attach could not obtain processes list.",
129+
"Error Message: ": "Error Message: ",
130+
"See {0} output": "See {0} output",
131+
"Failed to set extension directory": "Failed to set extension directory",
132+
"Failed to set debugadpter directory": "Failed to set debugadpter directory",
133+
"Failed to set install complete file path": "Failed to set install complete file path",
134+
"Unexpected RuntimeId '{0}'.": "Unexpected RuntimeId '{0}'.",
135+
"Ignoring non-parseable lines in envFile {0}: {1}.": "Ignoring non-parseable lines in envFile {0}: {1}.",
136+
"Unexpected message received from debugger.": "Unexpected message received from debugger.",
137+
"[ERROR]: C# Extension failed to install the debugger package.": "[ERROR]: C# Extension failed to install the debugger package.",
138+
"Could not find a process id to attach.": "Could not find a process id to attach.",
139+
"[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.": "[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.",
140+
"[ERROR] The debugger cannot be installed. Unknown platform.": "[ERROR] The debugger cannot be installed. Unknown platform.",
141+
"Failed to complete the installation of the C# extension. Please see the error in the output window below.": "Failed to complete the installation of the C# extension. Please see the error in the output window below.",
142+
"An error occurred during installation of the .NET Debugger. The C# extension may need to be reinstalled.": "An error occurred during installation of the .NET Debugger. The C# extension may need to be reinstalled.",
143+
"Get the SDK": "Get the SDK",
144+
"Disable message in settings": "Disable message in settings",
145+
"Help": "Help",
146+
"The C# extension is still downloading packages. Please see progress in the output window below.": "The C# extension is still downloading packages. Please see progress in the output window below."
85147
}

src/coreclrDebug/activate.ts

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export async function activate(
4141
// a warning was already issued, so do nothing.
4242
if (isValidArchitecture) {
4343
eventStream.post(
44-
new DebuggerPrerequisiteFailure('[ERROR]: C# Extension failed to install the debugger package.')
44+
new DebuggerPrerequisiteFailure(
45+
vscode.l10n.t('[ERROR]: C# Extension failed to install the debugger package.')
46+
)
4547
);
4648
showInstallErrorMessage(eventStream);
4749
}
@@ -60,7 +62,7 @@ export async function activate(
6062
const attachItem = await RemoteAttachPicker.ShowAttachEntries(args, platformInformation);
6163
return attachItem
6264
? attachItem.id
63-
: Promise.reject<string>(new Error('Could not find a process id to attach.'));
65+
: Promise.reject<string>(new Error(vscode.l10n.t('Could not find a process id to attach.')));
6466
})
6567
);
6668

@@ -117,7 +119,9 @@ async function checkIsValidArchitecture(
117119
) {
118120
eventStream.post(
119121
new DebuggerPrerequisiteFailure(
120-
'[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.'
122+
vscode.l10n.t(
123+
'[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.'
124+
)
121125
)
122126
);
123127
return false;
@@ -128,7 +132,9 @@ async function checkIsValidArchitecture(
128132
if (platformInformation.architecture === 'x86') {
129133
eventStream.post(
130134
new DebuggerPrerequisiteWarning(
131-
`[WARNING]: x86 Windows is not supported by the .NET debugger. Debugging will not be available.`
135+
vscode.l10n.t(
136+
`[WARNING]: x86 Windows is not supported by the .NET debugger. Debugging will not be available.`
137+
)
132138
)
133139
);
134140
return false;
@@ -140,7 +146,9 @@ async function checkIsValidArchitecture(
140146
}
141147
}
142148

143-
eventStream.post(new DebuggerPrerequisiteFailure('[ERROR] The debugger cannot be installed. Unknown platform.'));
149+
eventStream.post(
150+
new DebuggerPrerequisiteFailure(vscode.l10n.t('[ERROR] The debugger cannot be installed. Unknown platform.'))
151+
);
144152
return false;
145153
}
146154

@@ -156,7 +164,9 @@ async function completeDebuggerInstall(
156164
if (!isValidArchitecture) {
157165
eventStream.post(new DebuggerNotInstalledFailure());
158166
vscode.window.showErrorMessage(
159-
'Failed to complete the installation of the C# extension. Please see the error in the output window below.'
167+
vscode.l10n.t(
168+
'Failed to complete the installation of the C# extension. Please see the error in the output window below.'
169+
)
160170
);
161171
return false;
162172
}
@@ -179,16 +189,18 @@ async function completeDebuggerInstall(
179189
function showInstallErrorMessage(eventStream: EventStream) {
180190
eventStream.post(new DebuggerNotInstalledFailure());
181191
vscode.window.showErrorMessage(
182-
'An error occurred during installation of the .NET Debugger. The C# extension may need to be reinstalled.'
192+
vscode.l10n.t(
193+
'An error occurred during installation of the .NET Debugger. The C# extension may need to be reinstalled.'
194+
)
183195
);
184196
}
185197

186198
function showDotnetToolsWarning(message: string): void {
187199
const config = vscode.workspace.getConfiguration('csharp');
188200
if (!config.get('suppressDotnetInstallWarning', false)) {
189-
const getDotNetMessage = 'Get the SDK';
190-
const goToSettingsMessage = 'Disable message in settings';
191-
const helpMessage = 'Help';
201+
const getDotNetMessage = vscode.l10n.t('Get the SDK');
202+
const goToSettingsMessage = vscode.l10n.t('Disable message in settings');
203+
const helpMessage = vscode.l10n.t('Help');
192204
// Buttons are shown in right-to-left order, with a close button to the right of everything;
193205
// getDotNetMessage will be the first button, then goToSettingsMessage, then the close button.
194206
vscode.window.showErrorMessage(message, goToSettingsMessage, getDotNetMessage, helpMessage).then((value) => {
@@ -248,7 +260,9 @@ export class DebugAdapterExecutableFactory implements vscode.DebugAdapterDescrip
248260
if (!installLock) {
249261
this.eventStream.post(new DebuggerNotInstalledFailure());
250262
throw new Error(
251-
'The C# extension is still downloading packages. Please see progress in the output window below.'
263+
vscode.l10n.t(
264+
'The C# extension is still downloading packages. Please see progress in the output window below.'
265+
)
252266
);
253267
}
254268
// install.complete does not exist, check dotnetCLI to see if we can complete.
@@ -262,7 +276,9 @@ export class DebugAdapterExecutableFactory implements vscode.DebugAdapterDescrip
262276
if (!success) {
263277
this.eventStream.post(new DebuggerNotInstalledFailure());
264278
throw new Error(
265-
'Failed to complete the installation of the C# extension. Please see the error in the output window below.'
279+
vscode.l10n.t(
280+
'Failed to complete the installation of the C# extension. Please see the error in the output window below.'
281+
)
266282
);
267283
}
268284
}

src/coreclrDebug/debuggerEventsProtocol.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import * as vscode from 'vscode';
7+
68
// This contains the definition of messages that VsDbg-UI can send back to a listener which registers itself via the 'debuggerEventsPipeName'
79
// property on a launch or attach request.
810
//
@@ -28,7 +30,7 @@ export interface ProcessLaunchedEvent extends DebuggerEvent {
2830
export function decodePacket(packet: Buffer): DebuggerEvent {
2931
// Verify the message ends in a newline
3032
if (packet[packet.length - 1] != 10 /*\n*/) {
31-
throw new Error('Unexpected message received from debugger.');
33+
throw new Error(vscode.l10n.t('Unexpected message received from debugger.'));
3234
}
3335

3436
const message = packet.toString('utf-8', 0, packet.length - 1);

src/coreclrDebug/parsedEnvironmentFile.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import * as vscode from 'vscode';
67
import * as fs from 'fs';
78

89
export class ParsedEnvironmentFile {
@@ -66,7 +67,11 @@ export class ParsedEnvironmentFile {
6667
// show error message if single lines cannot get parsed
6768
let warning: string | undefined;
6869
if (parseErrors.length !== 0) {
69-
warning = `Ignoring non-parseable lines in envFile ${envFile}: ${parseErrors.join(', ')}.`;
70+
warning = vscode.l10n.t(
71+
'Ignoring non-parseable lines in envFile {0}: {1}.',
72+
envFile,
73+
parseErrors.join(', ')
74+
);
7075
}
7176

7277
return new ParsedEnvironmentFile(env, warning);

0 commit comments

Comments
 (0)