Feature request
dotnet --info
output: .NET Core SDK (reflecting any global.json):
Version: 2.2.401
Commit: 729b316c13
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: debian.9-x64
Base Path: /usr/share/dotnet/sdk/2.2.401/
Host (useful for support):
Version: 2.2.6
Commit: 7dac9b1b51
.NET Core SDKs installed:
2.2.401 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
C# (.NET Core Latest)
( mcr.microsoft.com/dotnet/core/sdk:latest )No intellisense inside cshtml
files
Want to have html and razor intellisense
Nothing
Edit: I was not sure so i tried with a simple Dotnet Core Razor WebApp and YES, it's not working.
Thanks for the report @HoTKreeZy !
More or less the same here. New ASP MVC project (net core 3 preview 8), remote Ubuntu 18.04 via SSH:
dotnet --info
:.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview8-013656
Commit: 8bf06ffc8d
Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-x64
Base Path: /snap/dotnet-sdk/45/sdk/3.0.100-preview8-013656/
Host (useful for support):
Version: 3.0.0-preview8-28405-07
Commit: d01b2fb7bc
.NET Core SDKs installed:
3.0.100-preview8-013656 [/snap/dotnet-sdk/45/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0-preview8.19405.7 [/snap/dotnet-sdk/45/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0-preview8-28405-07 [/snap/dotnet-sdk/45/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
When I open a .cshtml
file, I got no Intellisense. The same is for .razor
files for a Blazor project. What I've observed is that the log of the Razor Log on VSCode shows a crash:
Razor.VSCode version 1.0.0-alpha3-20190627.5
--------------------------------------------------------------------------------
Razor's trace level is currently set to 'Off'
- To change Razor's trace level set 'razor.trace' to 'Off', 'Messages' or 'Verbose' and then restart VSCode.
- To report issues invoke the 'Report a Razor issue' command via the command palette.
-----------------------------------------------------------------------------------------------------------------------------
[Client - 5:59:20 PM] (Error) Failed to read project config at location /home/peluko/devel/asptest1/obj/Debug/netcoreapp3.0/project.razor.json.
Unexpected end of JSON input
Stack Trace:
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at t.RazorProjectManager.getProjectConfiguration (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:167240)
at t.RazorProjectManager.updateProjectConfiguration (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165797)
at t.RazorProjectManager.<anonymous> (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165489)
at Generator.next (<anonymous>)
at /home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:164457
at new Promise (<anonymous>)
at r (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:164234)
at i.onDidCreate.e (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165444)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:549:862)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at u.$onFileEvent (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:550:901)
at d._doInvokeHandler (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:668:1006)
at d._invokeHandler (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:668:698)
at d._receiveRequest (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:667:346)
at d._receiveOneMessage (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:666:141)
at _protocol.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:664:400)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at a (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:815)
at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:861)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at e.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:775:104)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at a (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:815)
at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:861)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at y._receiveMessage (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:188:834)
at _socketDisposables.push._socketReader.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:186:116)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at f.acceptChunk (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:182:588)
at _register._socket.onData.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:181:919)
at Socket.t (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:190:329)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
[Client - 5:59:27 PM] (Error) Failed to read project config at location /home/peluko/devel/asptest1/obj/Debug/netcoreapp3.0/project.razor.json.
Unexpected end of JSON input
Stack Trace:
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at t.RazorProjectManager.getProjectConfiguration (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:167240)
at t.RazorProjectManager.updateProjectConfiguration (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165797)
at t.RazorProjectManager.<anonymous> (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165683)
at Generator.next (<anonymous>)
at /home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:164457
at new Promise (<anonymous>)
at r (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:164234)
at i.onDidChange.e (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165638)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:549:955)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at u.$onFileEvent (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:550:901)
at d._doInvokeHandler (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:668:1006)
at d._invokeHandler (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:668:698)
at d._receiveRequest (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:667:346)
at d._receiveOneMessage (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:666:141)
at _protocol.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:664:400)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at a (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:815)
at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:861)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at e.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:775:104)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at a (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:815)
at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:861)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at y._receiveMessage (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:188:834)
at _socketDisposables.push._socketReader.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:186:116)
at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207)
at f.acceptChunk (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:182:588)
at _register._socket.onData.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:181:919)
at Socket.t (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:190:329)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
I've checked the obj/Debug/netcoreapp3.0/project.razor.json
file and it seems correct. The only peculiarity is that it shows some values containing a \n
("Documentation"
keys). Attached is the full file.
project.razor.json.zip
Hah, honestly @Peluko I'm shocked you got that far 馃槃, enabling remote Razor development issomethingg we want to do but haven't put any time into as of yet.
@NTaylorMullen Hey there, I'm having the same issue highlighted above, but with WSL. I'm wondering if it is a bug or is this a feature not implemented yet?
Thank you for the work on the extension 馃槃
EDIT: Here's what the OmniSharp Language output looks like
Starting OmniSharp server at 9/10/2019, 11:35:43 PM
Target: /home/drakota/Projects/SharpCRUD
OmniSharp server started.
Path: /home/drakota/.vscode-server-insiders/extensions/ms-vscode.csharp-1.21.2/.omnisharp/1.34.2/run
PID: 771
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on ubuntu 18.4 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 16.0 - "/home/drakota/.vscode-server-insiders/extensions/ms-vscode.csharp-1.21.2/.omnisharp/1.34.2/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/home/drakota/.vscode-server-insiders/extensions/ms-vscode.csharp-1.21.2/.omnisharp/1.34.2/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.0 - "/home/drakota/.vscode-server-insiders/extensions/ms-vscode.csharp-1.21.2/.omnisharp/1.34.2/omnisharp/.msbuild/Current/Bin"
MSBuildExtensionsPath = /home/drakota/.vscode-server-insiders/extensions/ms-vscode.csharp-1.21.2/.omnisharp/1.34.2/omnisharp/.msbuild
BypassFrameworkInstallChecks = true
CscToolPath = /home/drakota/.vscode-server-insiders/extensions/ms-vscode.csharp-1.21.2/.omnisharp/1.34.2/omnisharp/.msbuild/Current/Bin/Roslyn
CscToolExe = csc.exe
MSBuildToolsPath = /home/drakota/.vscode-server-insiders/extensions/ms-vscode.csharp-1.21.2/.omnisharp/1.34.2/omnisharp/.msbuild/Current/Bin
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/home/drakota/Projects/SharpCRUD'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
No solution files found in '/home/drakota/Projects/SharpCRUD'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/drakota/Projects/SharpCRUD/SharpCRUD.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/home/drakota/Projects/SharpCRUD'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /home/drakota/Projects/SharpCRUD/SharpCRUD.csproj
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/home/drakota/Projects/SharpCRUD' on host 660.
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/home/drakota/Projects/SharpCRUD/SharpCRUD.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/home/drakota/Projects/SharpCRUD/SharpCRUD.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Update project: SharpCRUD
[info]: OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.CachingCodeFixProviderForProjects
Skipping code fix provider 'Microsoft.CodeAnalysis.Analyzers.MetaAnalyzers.CodeFixes.ApplyDiagnosticAnalyzerAttributeFix' because it's language doesn't match 'C#'.
@NTaylorMullen Hey there, I'm having the same issue highlighted above, but with WSL. I'm wondering if it is a bug or is this a feature not implemented yet?
Hasn't been implemented yet 馃槃. I hear you though, we want to get this working too!
I'm not able to get any Intellisense on .cshtml files. For HTML, CSS, and JS, I get syntax highlighting but no intellisense. For Razor, it's shows default text color.
Auto-detect has the language set to aspnetcorerazor and I tried switching to HTML (C#) and that didn't change anything.
VSCode info
Version: 1.38.1 (user setup)
Commit: b37e54c98e1a74ba89e03073e5a3761284e3ffb0
Date: 2019-09-11T13:35:15.005Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362
Extensions related
Name: C#
Id: ms-vscode.csharp
Description: C# for Visual Studio Code (powered by OmniSharp).
Version: 1.21.3
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp
Name: ASP.NET Helper
Id: schneiderpat.aspnet-helper
Description: "Little helper to develop faster ASP.NET MVC apps"
Version: 0.6.4
Publisher: schneiderpat
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=schneiderpat.aspnet-helper
Exceptions
Unhandled Exception: OmniSharp.Extensions.JsonRpc.Server.JsonRpcException: Exception of type 'OmniSharp.Extensions.JsonRpc.Server.JsonRpcException' was thrown.
at OmniSharp.Extensions.JsonRpc.ResponseRouter.SendRequest[T,TResponse](String method, T params)
at Microsoft.AspNetCore.Razor.LanguageServer.DefaultRemoteTextLoaderFactory.RemoteTextLoader.LoadTextAndVersionAsync(Workspace workspace, DocumentId documentId, CancellationToken cancellationToken) in /_/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultRemoteTextLoaderFactory.cs:line 73
at Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState.GetTextAsync()
at Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultProjectSnapshotManager.<>c__DisplayClass19_0.<<DocumentOpened>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState.GetTextVersionAsync()
at Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentState.ComputedStateTracker.GetGeneratedOutputAndVersionCoreAsync(DefaultProjectSnapshot project, DocumentSnapshot document)
at Microsoft.CodeAnalysis.Razor.ProjectSystem.DefaultDocumentSnapshot.GetGeneratedOutputAsync()
at Microsoft.AspNetCore.Razor.LanguageServer.RazorDiagnosticsPublisher.PublishDiagnosticsAsync(DocumentSnapshot document) in /_/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorDiagnosticsPublisher.cs:line 156
at Microsoft.AspNetCore.Razor.LanguageServer.RazorDiagnosticsPublisher.WorkTimer_Tick(Object state) in /_/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorDiagnosticsPublisher.cs:line 196
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
I've changed a bit the title cause it's also not working for a 'simple' Dotnet Core Razor WebApp. So now, the issue title is more globaly.
More or less the same here. New ASP MVC project (net core 3 preview 8), remote Ubuntu 18.04 via SSH:
dotnet --info
:.NET Core SDK (reflecting any global.json): Version: 3.0.100-preview8-013656 Commit: 8bf06ffc8d Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /snap/dotnet-sdk/45/sdk/3.0.100-preview8-013656/ Host (useful for support): Version: 3.0.0-preview8-28405-07 Commit: d01b2fb7bc .NET Core SDKs installed: 3.0.100-preview8-013656 [/snap/dotnet-sdk/45/sdk] .NET Core runtimes installed: Microsoft.AspNetCore.App 3.0.0-preview8.19405.7 [/snap/dotnet-sdk/45/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.0.0-preview8-28405-07 [/snap/dotnet-sdk/45/shared/Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
- VSCode 1.37.1
- C# Extension: 1.21.0
- Local OS: Windows 10 1809
- Remote OS: Ubuntu 18.04 64 bits via SSH
When I open a
.cshtml
file, I got no Intellisense. The same is for.razor
files for a Blazor project. What I've observed is that the log of the Razor Log on VSCode shows a crash:Razor.VSCode version 1.0.0-alpha3-20190627.5 -------------------------------------------------------------------------------- Razor's trace level is currently set to 'Off' - To change Razor's trace level set 'razor.trace' to 'Off', 'Messages' or 'Verbose' and then restart VSCode. - To report issues invoke the 'Report a Razor issue' command via the command palette. ----------------------------------------------------------------------------------------------------------------------------- [Client - 5:59:20 PM] (Error) Failed to read project config at location /home/peluko/devel/asptest1/obj/Debug/netcoreapp3.0/project.razor.json. Unexpected end of JSON input Stack Trace: SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at t.RazorProjectManager.getProjectConfiguration (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:167240) at t.RazorProjectManager.updateProjectConfiguration (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165797) at t.RazorProjectManager.<anonymous> (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165489) at Generator.next (<anonymous>) at /home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:164457 at new Promise (<anonymous>) at r (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:164234) at i.onDidCreate.e (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165444) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:549:862) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at u.$onFileEvent (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:550:901) at d._doInvokeHandler (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:668:1006) at d._invokeHandler (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:668:698) at d._receiveRequest (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:667:346) at d._receiveOneMessage (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:666:141) at _protocol.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:664:400) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at a (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:815) at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:861) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at e.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:775:104) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at a (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:815) at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:861) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at y._receiveMessage (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:188:834) at _socketDisposables.push._socketReader.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:186:116) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at f.acceptChunk (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:182:588) at _register._socket.onData.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:181:919) at Socket.t (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:190:329) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:283:12) at readableAddChunk (_stream_readable.js:264:11) at Socket.Readable.push (_stream_readable.js:219:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) [Client - 5:59:27 PM] (Error) Failed to read project config at location /home/peluko/devel/asptest1/obj/Debug/netcoreapp3.0/project.razor.json. Unexpected end of JSON input Stack Trace: SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at t.RazorProjectManager.getProjectConfiguration (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:167240) at t.RazorProjectManager.updateProjectConfiguration (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165797) at t.RazorProjectManager.<anonymous> (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165683) at Generator.next (<anonymous>) at /home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:164457 at new Promise (<anonymous>) at r (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:164234) at i.onDidChange.e (/home/peluko/.vscode-server/extensions/ms-vscode.csharp-1.21.0/dist/extension.js:80:165638) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:549:955) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at u.$onFileEvent (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:550:901) at d._doInvokeHandler (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:668:1006) at d._invokeHandler (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:668:698) at d._receiveRequest (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:667:346) at d._receiveOneMessage (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:666:141) at _protocol.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:664:400) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at a (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:815) at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:861) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at e.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:775:104) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at a (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:815) at e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:179:861) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at y._receiveMessage (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:188:834) at _socketDisposables.push._socketReader.onMessage.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:186:116) at u.fire (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:50:207) at f.acceptChunk (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:182:588) at _register._socket.onData.e (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:181:919) at Socket.t (/home/peluko/.vscode-server/bin/f06011ac164ae4dc8e753a3fe7f9549844d15e35/out/vs/server/remoteExtensionHostProcess.js:190:329) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:283:12) at readableAddChunk (_stream_readable.js:264:11) at Socket.Readable.push (_stream_readable.js:219:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
I've checked the
obj/Debug/netcoreapp3.0/project.razor.json
file and it seems correct. The only peculiarity is that it shows some values containing a\n
("Documentation"
keys). Attached is the full file.
project.razor.json.zip
I have the same error in a macos.
Hey all, thanks for the reports! We've yet to add full support for remote development but are hoping to get it done soon!
One of the blockers for this was a bug on vscode https://github.com/microsoft/vscode/issues/86901 which will be fixed in the next release. I'm still investigating if there is any other work that needs to be done here.
@ajaybhargavb Glad to hear that bug is getting squashed. There might be other work that needs to be done because even when the language is properly set it aspnetcorerazor
instead of Razor
, the syntax highlighting is still a bit off.
Take this razor component for example:
Notice the closing </p>
on line 10, or the C# code on lines 15 and 17.
Btw I generated the example above inside a vscode project that's not running inside remote containers, so Omnisharp used the host mono framework and had no issues switching to aspnetcorerazor
:
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 16.3 - "/Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin"
2: StandAlone 16.3 - "/Users/mark/.vscode/extensions/ms-vscode.csharp-1.21.8/.omnisharp/1.34.8/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 16.3 - "/Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin"
CscToolExe = csc.exe
CscToolPath = /Users/mark/.vscode/extensions/ms-vscode.csharp-1.21.8/.omnisharp/1.34.8/omnisharp/.msbuild/Current/Bin/Roslyn
@pheuter, what you are referring to is already being worked on. Tracked here https://github.com/aspnet/AspNetCore/issues/14287.
Got it, thanks for clarifying.
This is now works with the latest VSCode-Insiders and the latest C# extension. 馃帀
Most helpful comment
This is now works with the latest VSCode-Insiders and the latest C# extension. 馃帀