Skip to content

Commit 8754bf5

Browse files
authored
Merge branch 'main' into merges/prerelease-to-main
2 parents 7b7da92 + cbf2ba9 commit 8754bf5

30 files changed

+599
-188
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Enable loading translated strings from razor TS code (PR: [#5962](https://github.com/dotnet/vscode-csharp/pull/5962))
2626
* Update typescript and eslint plugin to remove build warning (PR: [6002](https://github.com/dotnet/vscode-csharp/pull/6002))
2727
* Report how the extension was activated (PR: [#6043](https://github.com/dotnet/vscode-csharp/pull/6043))
28+
* Update Razor to 7.0.0-preview.23410.1 (PR: [#6105](https://github.com/dotnet/vscode-csharp/pull/6105))
2829

2930
## 2.0.328
3031
* Update Roslyn to 4.8.0-1.23403.6 (PR: [#6003](https://github.com/dotnet/vscode-csharp/pull/6003))

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
}

package.json

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
".NET",
2828
"ASP.NET",
2929
".NET Core",
30-
"dotnet"
30+
"dotnet",
31+
"coreclr"
3132
],
3233
"capabilities": {
3334
"virtualWorkspaces": false,
@@ -1257,11 +1258,6 @@
12571258
"default": false,
12581259
"description": "If true, MSBuild project system will only load projects for files that were opened in the editor. This setting is useful for big C# codebases and allows for faster initialization of code navigation features only for projects that are relevant to code that is being edited. With this setting enabled OmniSharp may load fewer projects and may thus display incomplete reference lists for symbols."
12591260
},
1260-
"omnisharp.enableRoslynAnalyzers": {
1261-
"type": "boolean",
1262-
"default": false,
1263-
"description": "Enables support for roslyn analyzers, code fixes and rulesets."
1264-
},
12651261
"omnisharp.enableEditorConfigSupport": {
12661262
"type": "boolean",
12671263
"default": true,
@@ -1288,11 +1284,6 @@
12881284
"default": false,
12891285
"description": "(EXPERIMENTAL) Enables support for resolving completion edits asynchronously. This can speed up time to show the completion list, particularly override and partial method completion lists, at the cost of slight delays after inserting a completion item. Most completion items will have no noticeable impact with this feature, but typing immediately after inserting an override or partial method completion, before the insert is completed, can have unpredictable results."
12901286
},
1291-
"omnisharp.analyzeOpenDocumentsOnly": {
1292-
"type": "boolean",
1293-
"default": false,
1294-
"description": "Only run analyzers against open files when 'enableRoslynAnalyzers' is true"
1295-
},
12961287
"omnisharp.testRunSettings": {
12971288
"type": "string",
12981289
"description": "Path to the .runsettings file which should be used when running unit tests."
@@ -4745,44 +4736,8 @@
47454736
{
47464737
"language": "csharp",
47474738
"scopes": {
4748-
"namespace": [
4749-
"entity.name.type.namespace.cs"
4750-
],
4751-
"type": [
4752-
"entity.name.type"
4753-
],
4754-
"class": [
4755-
"entity.name.type.class.cs"
4756-
],
4757-
"enum": [
4758-
"entity.name.type.enum.cs"
4759-
],
4760-
"interface": [
4761-
"entity.name.type.interface.cs"
4762-
],
4763-
"struct": [
4764-
"entity.name.type.struct.cs"
4765-
],
47664739
"typeParameter": [
4767-
"entity.name.type.type-parameter.cs"
4768-
],
4769-
"parameter": [
4770-
"entity.name.variable.parameter.cs"
4771-
],
4772-
"variable": [
4773-
"entity.name.variable.local.cs"
4774-
],
4775-
"property": [
4776-
"variable.other.property.cs"
4777-
],
4778-
"enumMember": [
4779-
"variable.other.enummember.cs"
4780-
],
4781-
"method": [
4782-
"entity.name.function.member.cs"
4783-
],
4784-
"macro": [
4785-
"keyword.preprocessor.cs"
4740+
"entity.name.type.type-parameter"
47864741
],
47874742
"keyword": [
47884743
"keyword.cs"
@@ -4818,7 +4773,7 @@
48184773
"entity.name.variable.field.cs"
48194774
],
48204775
"constant": [
4821-
"variable.other.constant.cs"
4776+
"variable.other.constant"
48224777
],
48234778
"extensionMethod": [
48244779
"entity.name.function.extension.cs"
@@ -5034,4 +4989,4 @@
50344989
}
50354990
]
50364991
}
5037-
}
4992+
}

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);

0 commit comments

Comments
 (0)