Skip to content

Commit 4a14817

Browse files
authored
Merge branch 'master' into update_package
2 parents 9bd4654 + 3225cda commit 4a14817

File tree

14 files changed

+310
-97
lines changed

14 files changed

+310
-97
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ out
44
.omnisharp/
55
.omnisharp-*/
66
.debugger
7+
.razor
78
.vscode-test
89
.razor
910

CHANGELOG.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
## Known Issues in 1.17.0
22

3-
* Known limitations with the preview Razor (cshtml) language service:
3+
* Known limitations with the preview Razor (cshtml) language service to be addressed in a future release:
4+
* Only ASP.NET Core projects are supported (no support for ASP.NET projects)
45
* Support for tag helpers and formatting not yet implemented
56
* Limited support for colorization
67
* Loss of HTML completions following C# less than (`<`) operator
78
* Error squiggles misaligned for expressions near the start of a new line
89
* Leaving Razor files open for a significant period of time results in loss of Razor C# tooling on macOS
10+
* Incorrect errors in Blazor projects for event bindings
911
* There currently is no completion support for package references in csproj files. ([#1156](https://github.com/OmniSharp/omnisharp-vscode/issues/1156))
1012
* As an alternative, consider installing the [MSBuild Project Tools](https://marketplace.visualstudio.com/items?itemName=tintoy.msbuild-project-tools) extension by @tintoy.
1113

1214
## 1.17.0 (Not yet released)
1315

14-
* Added preview Razor (cshtml) language service with support for C# completions and diagnostics. Please report issues with the preview Razor tooling on the [aspnet/Razor.VSCode](https://github.com/aspnet/Razor.VSCode/issues) repo. To disable the preview Razor tooling set the "razor.disabled" setting to `true`. (PR: [2554](https://github.com/OmniSharp/omnisharp-vscode/pull/2554))
15-
16+
* Added preview Razor (cshtml) language service with support for C# completions and diagnostics in ASP.NET Core projects. Please report issues with the preview Razor tooling on the [aspnet/Razor.VSCode](https://github.com/aspnet/Razor.VSCode/issues) repo. To disable the preview Razor tooling set the "razor.disabled" setting to `true`. (PR: [2554](https://github.com/OmniSharp/omnisharp-vscode/pull/2554))
1617
* Added omnisharp.minFindSymbolsFilterLength setting to configure the number of characters a user must type in for "Go to Symbol in Workspace" command to return any results (default is 0 to preserve existing behavior). Additionally added omnisharp.maxFindSymbolsItems for configuring maximum number of items returned by "Go to Symbol in Workspace" command. The default is 1000. (PR: [#2487](https://github.com/OmniSharp/omnisharp-vscode/pull/2487))
17-
1818
* Added a command - "CSharp: Start authoring a new issue on GitHub" to enable the users to file issues on github from within the extension with helpful config information from their system.(PR: [#2503](https://github.com/OmniSharp/omnisharp-vscode/pull/2503))
1919

20+
#### Debugger
21+
* Fixed crash at the end of debug sessions on Linux ([#2439](https://github.com/OmniSharp/omnisharp-vscode/issues/2439))
22+
* Fixed searching for PDBs in original built location ([#2483](https://github.com/OmniSharp/omnisharp-vscode/issues/2483))
23+
* Fixed launching the web browser against an ASP.NET project that uses wildcard ('*') bindings ([#2528](https://github.com/OmniSharp/omnisharp-vscode/issues/2528))
24+
2025
## 1.16.2 (October 3, 2018)
2126
* Update extension to handle upcoming breaking change to launch.json configurations in VS Code 1.28. (PR: [#2558](https://github.com/OmniSharp/omnisharp-vscode/pull/2558))
2227
* Fixed a bug where OmniSharp flame was red in spite of OmniSharp loading the projects without any errors. (PR: [#2450](https://github.com/OmniSharp/omnisharp-vscode/pull/2540))

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ The C# extension is powered by [OmniSharp](https://github.com/OmniSharp/omnishar
2020
* [Documentation](https://code.visualstudio.com/docs/languages/csharp)
2121
* [Video Tutorial compiling with .NET Core](https://channel9.msdn.com/Blogs/dotnet/Get-started-VSCode-Csharp-NET-Core-Windows)
2222

23+
### What's new in 1.17.0
24+
* Added preview Razor (cshtml) language service with support for C# completions and diagnostics.
25+
* Added omnisharp.minFindSymbolsFilterLength setting to configure the number of characters a user must type in for "Go to Symbol in Workspace" command to return any results
26+
* Added a command - "CSharp: Start authoring a new issue on GitHub" to enable the users to file issues on github from within the extension with helpful config information from their system
27+
2328
### What's New in 1.16.2
2429
* Update extension to handle upcoming breaking change to launch.json configurations in VS Code 1.28.
2530
* Fixed launch.json `envFile` option on Windows
@@ -37,7 +42,7 @@ The C# extension is powered by [OmniSharp](https://github.com/OmniSharp/omnishar
3742
* Added `monoPath` option to use the mono installation at the specified path when the `useGlobalMono` is set to "always" or "auto".
3843
* Many other bug fixes!
3944

40-
See our [change log](https://github.com/OmniSharp/omnisharp-vscode/blob/v1.16.0/CHANGELOG.md) for more detail.
45+
See our [change log](https://github.com/OmniSharp/omnisharp-vscode/blob/v1.17.0/CHANGELOG.md) for more detail.
4146

4247
### Supported Operating Systems for Debugging
4348

package-lock.json

Lines changed: 16 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@
7373
"http-proxy-agent": "2.1.0",
7474
"https-proxy-agent": "2.2.1",
7575
"jsonc-parser": "1.0.0",
76-
"microsoft.aspnetcore.razor.vscode": "https://download.visualstudio.microsoft.com/download/pr/eee89386-9a82-4b4c-b30a-5857138f2eff/b0583648506c8fffe1ed9ff202702387/microsoft.aspnetcore.razor.vscode-1.0.0-alpha1-20181006.7.tgz",
76+
"microsoft.aspnetcore.razor.vscode": "https://download.visualstudio.microsoft.com/download/pr/da8ed554-fba5-4a26-858d-3d73425c2c9e/2775a951ae6431047ab6e3c51192585c/microsoft.aspnetcore.razor.vscode-1.0.0-alpha1-20181019.5.tgz",
7777
"mkdirp": "0.5.1",
7878
"node-filter-async": "0.0.4",
7979
"open": "*",
8080
"remove-bom-buffer": "3.0.0",
81-
"request-light": "0.2.2",
81+
"request-light": "0.2.4",
8282
"rxjs": "5.5.6",
8383
"semver": "*",
8484
"strip-bom": "3.0.0",
@@ -225,8 +225,8 @@
225225
},
226226
{
227227
"description": ".NET Core Debugger (Windows / x64)",
228-
"url": "https://download.visualstudio.microsoft.com/download/pr/b04322ea-547b-42b1-86d9-8489befa85cb/78cc7fe92df55ec751fa04231fe4a76f/coreclr-debug-win7-x64.zip",
229-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-16-0/coreclr-debug-win7-x64.zip",
228+
"url": "https://download.visualstudio.microsoft.com/download/pr/90e2038c-960d-4018-924e-30f520f887ab/117523c7024fbf6ffef530b707d7253a/coreclr-debug-win7-x64.zip",
229+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-17-1/coreclr-debug-win7-x64.zip",
230230
"installPath": ".debugger",
231231
"platforms": [
232232
"win32"
@@ -238,8 +238,8 @@
238238
},
239239
{
240240
"description": ".NET Core Debugger (macOS / x64)",
241-
"url": "https://download.visualstudio.microsoft.com/download/pr/b04322ea-547b-42b1-86d9-8489befa85cb/2aa44d6a3b45199178833506704024c8/coreclr-debug-osx-x64.zip",
242-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-16-0/coreclr-debug-osx-x64.zip",
241+
"url": "https://download.visualstudio.microsoft.com/download/pr/90e2038c-960d-4018-924e-30f520f887ab/2d53db027d1e67b899a7f083800b2bd4/coreclr-debug-osx-x64.zip",
242+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-17-1/coreclr-debug-osx-x64.zip",
243243
"installPath": ".debugger",
244244
"platforms": [
245245
"darwin"
@@ -255,8 +255,8 @@
255255
},
256256
{
257257
"description": ".NET Core Debugger (linux / x64)",
258-
"url": "https://download.visualstudio.microsoft.com/download/pr/b04322ea-547b-42b1-86d9-8489befa85cb/8a007d22a9733f620f86c87d5b2d66d4/coreclr-debug-linux-x64.zip",
259-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-16-0/coreclr-debug-linux-x64.zip",
258+
"url": "https://download.visualstudio.microsoft.com/download/pr/90e2038c-960d-4018-924e-30f520f887ab/090d7ebd63a3d44b31cb23568b53833d/coreclr-debug-linux-x64.zip",
259+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-17-1/coreclr-debug-linux-x64.zip",
260260
"installPath": ".debugger",
261261
"platforms": [
262262
"linux"
@@ -272,7 +272,7 @@
272272
},
273273
{
274274
"description": "Razor Language Server (Windows / x64)",
275-
"url": "https://download.visualstudio.microsoft.com/download/pr/eee89386-9a82-4b4c-b30a-5857138f2eff/3b812e4b415e128f291db79779a22fa6/razorlanguageserver-win-x64-1.0.0-alpha1-20181006.7.zip",
275+
"url": "https://download.visualstudio.microsoft.com/download/pr/da8ed554-fba5-4a26-858d-3d73425c2c9e/d7df9363c14be268a9f7011f3116ed9f/razorlanguageserver-win-x64-1.0.0-alpha1-20181019.5.zip",
276276
"installPath": ".razor",
277277
"platforms": [
278278
"win32"
@@ -283,7 +283,7 @@
283283
},
284284
{
285285
"description": "Razor Language Server (Windows / x86)",
286-
"url": "https://download.visualstudio.microsoft.com/download/pr/eee89386-9a82-4b4c-b30a-5857138f2eff/f21dc63eb40ce1c0a4c4a374f9ba2552/razorlanguageserver-win-x86-1.0.0-alpha1-20181006.7.zip",
286+
"url": "https://download.visualstudio.microsoft.com/download/pr/da8ed554-fba5-4a26-858d-3d73425c2c9e/2a8db9c750e55928277a381b73755e60/razorlanguageserver-win-x86-1.0.0-alpha1-20181019.5.zip",
287287
"installPath": ".razor",
288288
"platforms": [
289289
"win32"
@@ -294,7 +294,7 @@
294294
},
295295
{
296296
"description": "Razor Language Server (Linux / x64)",
297-
"url": "https://download.visualstudio.microsoft.com/download/pr/eee89386-9a82-4b4c-b30a-5857138f2eff/e207d758ad5afc02c7866eba018a772e/razorlanguageserver-linux-x64-1.0.0-alpha1-20181006.7.zip",
297+
"url": "https://download.visualstudio.microsoft.com/download/pr/da8ed554-fba5-4a26-858d-3d73425c2c9e/ee35c63e530362e1f86d1f2c834d1921/razorlanguageserver-linux-x64-1.0.0-alpha1-20181019.5.zip",
298298
"installPath": ".razor",
299299
"platforms": [
300300
"linux"
@@ -308,7 +308,7 @@
308308
},
309309
{
310310
"description": "Razor Language Server (macOS / x64)",
311-
"url": "https://download.visualstudio.microsoft.com/download/pr/eee89386-9a82-4b4c-b30a-5857138f2eff/797f57ed228c8a2fa48b0bbafd69b120/razorlanguageserver-osx-x64-1.0.0-alpha1-20181006.7.zip",
311+
"url": "https://download.visualstudio.microsoft.com/download/pr/da8ed554-fba5-4a26-858d-3d73425c2c9e/8efc7d28ce70069ddcad88c95dcb075f/razorlanguageserver-osx-x64-1.0.0-alpha1-20181019.5.zip",
312312
"installPath": ".razor",
313313
"platforms": [
314314
"darwin"
@@ -655,6 +655,19 @@
655655
"default": false,
656656
"description": "Specifies whether notifications should be shown if OmniSharp encounters warnings or errors loading a project. Note that these warnings/errors are always emitted to the OmniSharp log"
657657
},
658+
"razor.plugin.path": {
659+
"type": [
660+
"string",
661+
"null"
662+
],
663+
"default": null,
664+
"description": "Overrides the path to the Razor plugin dll."
665+
},
666+
"razor.devmode": {
667+
"type": "boolean",
668+
"default": false,
669+
"description": "Forces the omnisharp-vscode extension to run in a mode that enables local Razor.VSCode deving."
670+
},
658671
"razor.disabled": {
659672
"type": "boolean",
660673
"default": false,
@@ -673,7 +686,7 @@
673686
"default": false,
674687
"description": "Specifies whether to wait for debug attach when launching the language server."
675688
},
676-
"razor.languageServer.trace": {
689+
"razor.trace": {
677690
"type": "string",
678691
"default": "Off",
679692
"enum": [
@@ -682,9 +695,9 @@
682695
"Verbose"
683696
],
684697
"enumDescriptions": [
685-
"Does not log messages from Razor Language Server",
686-
"Logs only some messages from Razor Language Server",
687-
"Logs all messages from Razor Language Server"
698+
"Does not log messages from the Razor extension",
699+
"Logs only some messages from the Razor extension",
700+
"Logs all messages from the Razor extension"
688701
],
689702
"description": "Specifies whether to output all messages [Verbose], some messages [Messages] or not at all [Off]."
690703
}

src/main.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import createOptionStream from './observables/CreateOptionStream';
3838
import { CSharpExtensionId } from './constants/CSharpExtensionId';
3939
import { OpenURLObserver } from './observers/OpenURLObserver';
4040
import { activateRazorExtension } from './razor/razor';
41+
import { RazorLoggerObserver } from './observers/RazorLoggerObserver';
4142

4243
export async function activate(context: vscode.ExtensionContext): Promise<CSharpExtensionExports> {
4344

@@ -136,7 +137,12 @@ export async function activate(context: vscode.ExtensionContext): Promise<CSharp
136137
}
137138

138139
if (!optionProvider.GetLatestOptions().razorDisabled) {
139-
await activateRazorExtension(context, extension.extensionPath, eventStream);
140+
const razorObserver = new RazorLoggerObserver(omnisharpChannel);
141+
eventStream.subscribe(razorObserver.post);
142+
143+
if (!optionProvider.GetLatestOptions().razorDevMode) {
144+
await activateRazorExtension(context, extension.extensionPath, eventStream);
145+
}
140146
}
141147

142148
return {
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import { BaseLoggerObserver } from "./BaseLoggerObserver";
7+
import { RazorPluginPathSpecified, BaseEvent, RazorPluginPathDoesNotExist, RazorDevModeActive } from "../omnisharp/loggingEvents";
8+
9+
export class RazorLoggerObserver extends BaseLoggerObserver {
10+
public post = (event: BaseEvent) => {
11+
switch (event.constructor.name) {
12+
case RazorPluginPathSpecified.name:
13+
this.handleRazorPluginPathSpecifiedMessage(<RazorPluginPathSpecified>event);
14+
break;
15+
case RazorPluginPathDoesNotExist.name:
16+
this.handleRazorPluginPathDoesNotExistMessage(<RazorPluginPathDoesNotExist>event);
17+
break;
18+
case RazorDevModeActive.name:
19+
this.handleRazorDevMode();
20+
break;
21+
}
22+
}
23+
24+
private handleRazorPluginPathSpecifiedMessage(event: RazorPluginPathSpecified) {
25+
this.logger.appendLine('Razor Plugin Path Specified');
26+
this.logger.increaseIndent();
27+
this.logger.appendLine(`Path: ${event.path}`);
28+
this.logger.decreaseIndent();
29+
this.logger.appendLine();
30+
}
31+
32+
private handleRazorPluginPathDoesNotExistMessage(event: RazorPluginPathSpecified) {
33+
this.logger.appendLine(`[error]: Razor plugin path was specified as '${event.path}' but does not exist on disk.`);
34+
}
35+
36+
private handleRazorDevMode() {
37+
this.logger.appendLine('Razor dev mode active. Suppressing built-in OmniSharp Razor support.');
38+
this.logger.appendLine();
39+
}
40+
}

0 commit comments

Comments
 (0)