Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting aspnetcorerazor (*.cshtml) Files Breaks after v2.15.30 #10130

Closed
johnmgrant opened this issue Mar 14, 2024 · 11 comments · Fixed by #10133
Closed

Formatting aspnetcorerazor (*.cshtml) Files Breaks after v2.15.30 #10130

johnmgrant opened this issue Mar 14, 2024 · 11 comments · Fixed by #10133
Labels

Comments

@johnmgrant
Copy link

johnmgrant commented Mar 14, 2024

Type: Bug

Unable to format *.cshtml files in VS Code

Steps to Reproduce

  1. Update settings.json to include the following:
  // C# and .Net formatting and tools
  "[csharp][aspnetcorerazor][razor]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "ms-dotnettools.csharp"
  }
  1. Navigate to an existing *.cshtml file with indentation issues, or create a new one and save.
  2. Note that formatting does not work.
  3. Rollback C# extension to 2.15.30.
  4. Reload VS Code and follow steps 2 and 3
  5. Notice that the file formats as expected

NOTE: The pre-release exhibits the same bug.

Expected Behavior

Indentation should be fixed on save.

Actual Behavior

Indentation does not get fixed and manually formatting the document throws an error in VS Code to download a supported formatter for aspnetcorerazor.

Logs

C# log

Using dotnet configured on PATH Dotnet path: /usr/local/share/dotnet/dotnet Activating C# + C# Dev Kit + C# IntelliCode... Starting server at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll Server arguments /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll --logLevel Trace --starredCompletionComponentPath /Users/john.grant/.vscode/extensions/ms-dotnettools.vscodeintellicode-csharp-0.1.26-darwin-x64/components/starred-suggestions/node_modules/@vsintellicode/starred-suggestions-csharp --devKitDependencyPath /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslynDevKit/Microsoft.VisualStudio.LanguageServices.DevKit.dll --sessionId 2c8f91ca-8239-4e14-9618-ec32208bc3891710432564875 --telemetryLevel all --extensionLogDirectory /Users/john.grant/Library/Application Support/Code/logs/20240314T114648/window1/exthost/ms-dotnettools.csharp waiting for named pipe information from server... [stdout] trce: Program[0] .NET Runtime Version: .NET 8.0.0 [stdout] trce: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0] Creating /Users/john.grant/.vscode/extensions/ms-dotnettools.vscodeintellicode-csharp-0.1.26-darwin-x64/components/starred-suggestions/node_modules/@vsintellicode/starred-suggestions-csharp load context for /Users/john.grant/.vscode/extensions/ms-dotnettools.vscodeintellicode-csharp-0.1.26-darwin-x64/components/starred-suggestions/node_modules/@vsintellicode/starred-suggestions-csharp/Microsoft.VisualStudio.IntelliCode.CSharp.dll [stdout] trce: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0] Composing MEF catalog using: /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Remote.Workspaces.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Workspaces.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version2_X.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Language.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Scripting.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version1_X.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.ExternalAccess.Xaml.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.MSBuild.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Elfie.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.Protocol.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.ExternalAccess.AspNetCore.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Features.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.CSharp.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.AnalyzerUtilities.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Features.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.ServiceHub.Client.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.ServiceHub.Resources.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.ServiceHub.Framework.dll /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslynDevKit/Microsoft.VisualStudio.LanguageServices.DevKit.dll. [stdout] trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Workspaces, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Remote.Workspaces, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Razor.Compiler.Mvc, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version2_X, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Razor.Compiler.Language, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Scripting, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version1_X, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.ExternalAccess.Xaml, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Workspaces.MSBuild, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Elfie, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 [stdout] trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 [stdout] trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.ExternalAccess.AspNetCore, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Workspaces, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Razor.Compiler.CSharp, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.AnalyzerUtilities, Version=3.3.2.30504, Culture=neutral, PublicKeyToken=31bf3856ad364e35 [stdout] trce: MEF Assembly Loader[0] Loading assembly Microsoft.ServiceHub.Resources, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a trce: MEF Assembly Loader[0] Loading assembly Microsoft.ServiceHub.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a trce: MEF Assembly Loader[0] Loading assembly Microsoft.ServiceHub.Framework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a trce: MEF Assembly Loader[0] Loading assembly Microsoft.VisualStudio.LanguageServices.DevKit, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: DevKitAssemblyResolver[0] Loading Microsoft.VisualStudio.LanguageServices.DevKit from DevKit directory [stdout] trce: DevKitAssemblyResolver[0] Loading Microsoft.VisualStudio.Debugger.Contracts from DevKit directory [stdout] trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Workspaces, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Workspaces, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Workspaces, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.LanguageServer.Protocol, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 trce: MEF Assembly Loader[0] Loading assembly Microsoft.CodeAnalysis.CSharp.Features, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 [stdout] trce: Microsoft.CodeAnalysis.LanguageServer.Logging.VSCodeTelemetryLogger[0] Telemetry session started with sessionID: 2c8f91ca-8239-4e14-9618-ec32208bc3891710432564875 [stdout] dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Remote.Workspaces.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Workspaces.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version2_X.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Language.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Scripting.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version1_X.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.ExternalAccess.Xaml.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.MSBuild.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Elfie.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.ExternalAccess.AspNetCore.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Features.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.CSharp.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.AnalyzerUtilities.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Features.dll added to workspace. [stdout] {"pipeName":"/var/folders/l0/60fy4l994p931c1x9cw5yjj80000gs/T/13e511e3.sock"} received named pipe information from server attempting to connect client to server... client has connected to server [Info - 12:09:30 PM] [Program] Language server initialized [LanguageServerHost] [04:09:30.160][Start]initialize [LanguageServerHost] [04:09:30.311][End]initialize [LanguageServerHost] [04:09:30.313][Start]initialized [LanguageServerHost] [04:09:30.379][End]initialized [LanguageServerHost] [04:09:30.398][Start]workspace/diagnostic [LanguageServerHost] PublicWorkspacePullDiagnosticsHandler(category: , source: ) started getting diagnostics [LanguageServerHost] previousResults.Length=0 [LanguageServerHost] Processing 0 documents [LanguageServerHost] [04:09:31.485][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:09:31.491][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:09:31.808][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:09:31.809][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:10:07.552][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:10:07.553][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:10:12.760][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:10:12.760][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:10:12.821][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:10:12.822][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:10:13.014][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:10:13.015][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.380][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.380][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.424][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.425][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.468][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.469][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.645][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.645][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.871][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:26.871][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:29.009][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:29.009][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:29.213][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:29.213][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:29.214][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:29.214][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:29.219][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:12:29.220][End]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:13:12.882][Start]workspace/buildOnlyDiagnosticIds [LanguageServerHost] [04:13:12.882][End]workspace/buildOnlyDiagnosticIds

C# LSP Trace Logs

Extension vscode.bat does not contribute csharpExtensionLoadPaths Extension vscode.clojure does not contribute csharpExtensionLoadPaths Extension vscode.coffeescript does not contribute csharpExtensionLoadPaths Extension vscode.configuration-editing does not contribute csharpExtensionLoadPaths Extension vscode.cpp does not contribute csharpExtensionLoadPaths Extension vscode.csharp does not contribute csharpExtensionLoadPaths Extension vscode.css does not contribute csharpExtensionLoadPaths Extension vscode.css-language-features does not contribute csharpExtensionLoadPaths Extension vscode.dart does not contribute csharpExtensionLoadPaths Extension vscode.debug-auto-launch does not contribute csharpExtensionLoadPaths Extension vscode.debug-server-ready does not contribute csharpExtensionLoadPaths Extension vscode.diff does not contribute csharpExtensionLoadPaths Extension vscode.docker does not contribute csharpExtensionLoadPaths Extension vscode.emmet does not contribute csharpExtensionLoadPaths Extension vscode.extension-editing does not contribute csharpExtensionLoadPaths Extension vscode.fsharp does not contribute csharpExtensionLoadPaths Extension vscode.git does not contribute csharpExtensionLoadPaths Extension vscode.git-base does not contribute csharpExtensionLoadPaths Extension vscode.github does not contribute csharpExtensionLoadPaths Extension vscode.github-authentication does not contribute csharpExtensionLoadPaths Extension vscode.go does not contribute csharpExtensionLoadPaths Extension vscode.groovy does not contribute csharpExtensionLoadPaths Extension vscode.grunt does not contribute csharpExtensionLoadPaths Extension vscode.gulp does not contribute csharpExtensionLoadPaths Extension vscode.handlebars does not contribute csharpExtensionLoadPaths Extension vscode.hlsl does not contribute csharpExtensionLoadPaths Extension vscode.html does not contribute csharpExtensionLoadPaths Extension vscode.html-language-features does not contribute csharpExtensionLoadPaths Extension vscode.ini does not contribute csharpExtensionLoadPaths Extension vscode.ipynb does not contribute csharpExtensionLoadPaths Extension vscode.jake does not contribute csharpExtensionLoadPaths Extension vscode.java does not contribute csharpExtensionLoadPaths Extension vscode.javascript does not contribute csharpExtensionLoadPaths Extension vscode.json does not contribute csharpExtensionLoadPaths Extension vscode.json-language-features does not contribute csharpExtensionLoadPaths Extension vscode.julia does not contribute csharpExtensionLoadPaths Extension vscode.latex does not contribute csharpExtensionLoadPaths Extension vscode.less does not contribute csharpExtensionLoadPaths Extension vscode.log does not contribute csharpExtensionLoadPaths Extension vscode.lua does not contribute csharpExtensionLoadPaths Extension vscode.make does not contribute csharpExtensionLoadPaths Extension vscode.markdown does not contribute csharpExtensionLoadPaths Extension vscode.markdown-language-features does not contribute csharpExtensionLoadPaths Extension vscode.markdown-math does not contribute csharpExtensionLoadPaths Extension vscode.media-preview does not contribute csharpExtensionLoadPaths Extension vscode.merge-conflict does not contribute csharpExtensionLoadPaths Extension vscode.microsoft-authentication does not contribute csharpExtensionLoadPaths Extension ms-vscode.js-debug does not contribute csharpExtensionLoadPaths Extension ms-vscode.js-debug-companion does not contribute csharpExtensionLoadPaths Extension ms-vscode.vscode-js-profile-table does not contribute csharpExtensionLoadPaths Extension vscode.builtin-notebook-renderers does not contribute csharpExtensionLoadPaths Extension vscode.npm does not contribute csharpExtensionLoadPaths Extension vscode.objective-c does not contribute csharpExtensionLoadPaths Extension vscode.perl does not contribute csharpExtensionLoadPaths Extension vscode.php does not contribute csharpExtensionLoadPaths Extension vscode.php-language-features does not contribute csharpExtensionLoadPaths Extension vscode.powershell does not contribute csharpExtensionLoadPaths Extension vscode.pug does not contribute csharpExtensionLoadPaths Extension vscode.python does not contribute csharpExtensionLoadPaths Extension vscode.r does not contribute csharpExtensionLoadPaths Extension vscode.razor does not contribute csharpExtensionLoadPaths Extension vscode.references-view does not contribute csharpExtensionLoadPaths Extension vscode.restructuredtext does not contribute csharpExtensionLoadPaths Extension vscode.ruby does not contribute csharpExtensionLoadPaths Extension vscode.rust does not contribute csharpExtensionLoadPaths Extension vscode.scss does not contribute csharpExtensionLoadPaths Extension vscode.search-result does not contribute csharpExtensionLoadPaths Extension vscode.shaderlab does not contribute csharpExtensionLoadPaths Extension vscode.shellscript does not contribute csharpExtensionLoadPaths Extension vscode.simple-browser does not contribute csharpExtensionLoadPaths Extension vscode.sql does not contribute csharpExtensionLoadPaths Extension vscode.swift does not contribute csharpExtensionLoadPaths Extension vscode.theme-abyss does not contribute csharpExtensionLoadPaths Extension vscode.theme-defaults does not contribute csharpExtensionLoadPaths Extension vscode.theme-kimbie-dark does not contribute csharpExtensionLoadPaths Extension vscode.theme-monokai does not contribute csharpExtensionLoadPaths Extension vscode.theme-monokai-dimmed does not contribute csharpExtensionLoadPaths Extension vscode.theme-quietlight does not contribute csharpExtensionLoadPaths Extension vscode.theme-red does not contribute csharpExtensionLoadPaths Extension vscode.vscode-theme-seti does not contribute csharpExtensionLoadPaths Extension vscode.theme-solarized-dark does not contribute csharpExtensionLoadPaths Extension vscode.theme-solarized-light does not contribute csharpExtensionLoadPaths Extension vscode.theme-tomorrow-night-blue does not contribute csharpExtensionLoadPaths Extension vscode.tunnel-forwarding does not contribute csharpExtensionLoadPaths Extension vscode.typescript does not contribute csharpExtensionLoadPaths Extension vscode.typescript-language-features does not contribute csharpExtensionLoadPaths Extension vscode.vb does not contribute csharpExtensionLoadPaths Extension vscode.xml does not contribute csharpExtensionLoadPaths Extension vscode.yaml does not contribute csharpExtensionLoadPaths Extension dbaeumer.vscode-eslint does not contribute csharpExtensionLoadPaths Extension eamodio.gitlens does not contribute csharpExtensionLoadPaths Extension EditorConfig.EditorConfig does not contribute csharpExtensionLoadPaths Extension esbenp.prettier-vscode does not contribute csharpExtensionLoadPaths Extension fernandoescolar.vscode-solution-explorer does not contribute csharpExtensionLoadPaths Extension GitHub.copilot does not contribute csharpExtensionLoadPaths Extension GitHub.copilot-chat does not contribute csharpExtensionLoadPaths Extension github.vscode-github-actions does not contribute csharpExtensionLoadPaths Extension GitHub.vscode-pull-request-github does not contribute csharpExtensionLoadPaths Extension ms-dotnettools.csdevkit does not contribute csharpExtensionLoadPaths Extension ms-dotnettools.csharp does not contribute csharpExtensionLoadPaths Extension ms-dotnettools.vscode-dotnet-runtime does not contribute csharpExtensionLoadPaths Extension ms-dotnettools.vscodeintellicode-csharp does not contribute csharpExtensionLoadPaths Extension ms-python.debugpy does not contribute csharpExtensionLoadPaths Extension ms-python.python does not contribute csharpExtensionLoadPaths Extension ms-python.vscode-pylance does not contribute csharpExtensionLoadPaths Extension ms-vscode.powershell does not contribute csharpExtensionLoadPaths Extension Murugaratham.vscode-dotnet-watch does not contribute csharpExtensionLoadPaths Extension rohit-gohri.format-code-action does not contribute csharpExtensionLoadPaths Extension stylelint.vscode-stylelint does not contribute csharpExtensionLoadPaths Extension unifiedjs.vscode-mdx does not contribute csharpExtensionLoadPaths Extension vscode-icons-team.vscode-icons does not contribute csharpExtensionLoadPaths Extension Vue.volar does not contribute csharpExtensionLoadPaths [Trace - 12:09:30 PM] Sending notification 'initialized'. Params: {}

[Trace - 12:09:30 PM] Sending request 'workspace/diagnostic - (1)'.
Params: {
"previousResultIds": [],
"partialResultToken": "eaf541c7-77b2-4854-a65b-162e7d7fec15"
}

[Trace - 12:09:30 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:09:30.311][End]initialize"
}

[Trace - 12:09:30 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:09:30.313][Start]initialized"
}

[Trace - 12:09:30 PM] Received request 'client/registerCapability - (2)'.
Params: {
"registrations": [
{
"id": "c9b41aef-b280-49c7-8488-f9f53264e758",
"method": "workspace/didChangeConfiguration"
}
]
}

[Trace - 12:09:30 PM] Sending response 'client/registerCapability - (2)'. Processing request took 0ms
No result returned.

[Trace - 12:09:30 PM] Received request 'workspace/configuration - (3)'.
Params: {
"items": [
{
"section": "csharp|symbol_search.dotnet_search_reference_assemblies"
},
{
"section": "visual_basic|symbol_search.dotnet_search_reference_assemblies"
},
{
"section": "csharp|implement_type.dotnet_insertion_behavior"
},
{
"section": "visual_basic|implement_type.dotnet_insertion_behavior"
},
{
"section": "csharp|implement_type.dotnet_property_generation_behavior"
},
{
"section": "visual_basic|implement_type.dotnet_property_generation_behavior"
},
{
"section": "csharp|completion.dotnet_show_name_completion_suggestions"
},
{
"section": "visual_basic|completion.dotnet_show_name_completion_suggestions"
},
{
"section": "csharp|completion.dotnet_provide_regex_completions"
},
{
"section": "visual_basic|completion.dotnet_provide_regex_completions"
},
{
"section": "csharp|completion.dotnet_show_completion_items_from_unimported_namespaces"
},
{
"section": "visual_basic|completion.dotnet_show_completion_items_from_unimported_namespaces"
},
{
"section": "csharp|quick_info.dotnet_show_remarks_in_quick_info"
},
{
"section": "visual_basic|quick_info.dotnet_show_remarks_in_quick_info"
},
{
"section": "navigation.dotnet_navigate_to_decompiled_sources"
},
{
"section": "csharp|highlighting.dotnet_highlight_related_json_components"
},
{
"section": "visual_basic|highlighting.dotnet_highlight_related_json_components"
},
{
"section": "csharp|highlighting.dotnet_highlight_related_regex_components"
},
{
"section": "visual_basic|highlighting.dotnet_highlight_related_regex_components"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_literal_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_literal_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_indexer_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_indexer_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_object_creation_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_object_creation_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_enable_inlay_hints_for_other_parameters"
},
{
"section": "visual_basic|inlay_hints.dotnet_enable_inlay_hints_for_other_parameters"
},
{
"section": "csharp|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix"
},
{
"section": "visual_basic|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix"
},
{
"section": "csharp|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent"
},
{
"section": "visual_basic|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent"
},
{
"section": "csharp|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name"
},
{
"section": "visual_basic|inlay_hints.dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name"
},
{
"section": "csharp|inlay_hints.csharp_enable_inlay_hints_for_types"
},
{
"section": "visual_basic|inlay_hints.csharp_enable_inlay_hints_for_types"
},
{
"section": "csharp|inlay_hints.csharp_enable_inlay_hints_for_implicit_variable_types"
},
{
"section": "visual_basic|inlay_hints.csharp_enable_inlay_hints_for_implicit_variable_types"
},
{
"section": "csharp|inlay_hints.csharp_enable_inlay_hints_for_lambda_parameter_types"
},
{
"section": "visual_basic|inlay_hints.csharp_enable_inlay_hints_for_lambda_parameter_types"
},
{
"section": "csharp|inlay_hints.csharp_enable_inlay_hints_for_implicit_object_creation"
},
{
"section": "visual_basic|inlay_hints.csharp_enable_inlay_hints_for_implicit_object_creation"
},
{
"section": "csharp|code_style.formatting.indentation_and_spacing.tab_width"
},
{
"section": "visual_basic|code_style.formatting.indentation_and_spacing.tab_width"
},
{
"section": "csharp|code_style.formatting.indentation_and_spacing.indent_size"
},
{
"section": "visual_basic|code_style.formatting.indentation_and_spacing.indent_size"
},
{
"section": "csharp|code_style.formatting.indentation_and_spacing.indent_style"
},
{
"section": "visual_basic|code_style.formatting.indentation_and_spacing.indent_style"
},
{
"section": "csharp|code_style.formatting.new_line.end_of_line"
},
{
"section": "visual_basic|code_style.formatting.new_line.end_of_line"
},
{
"section": "code_style.formatting.new_line.insert_final_newline"
},
{
"section": "csharp|background_analysis.dotnet_analyzer_diagnostics_scope"
},
{
"section": "visual_basic|background_analysis.dotnet_analyzer_diagnostics_scope"
},
{
"section": "csharp|background_analysis.dotnet_compiler_diagnostics_scope"
},
{
"section": "visual_basic|background_analysis.dotnet_compiler_diagnostics_scope"
},
{
"section": "csharp|code_lens.dotnet_enable_references_code_lens"
},
{
"section": "visual_basic|code_lens.dotnet_enable_references_code_lens"
},
{
"section": "csharp|code_lens.dotnet_enable_tests_code_lens"
},
{
"section": "visual_basic|code_lens.dotnet_enable_tests_code_lens"
},
{
"section": "projects.dotnet_binary_log_path"
},
{
"section": "projects.dotnet_enable_automatic_restore"
}
]
}

[Trace - 12:09:30 PM] Sending response 'workspace/configuration - (3)'. Processing request took 1ms
Result: [
true,
null,
"withOtherMembersOfTheSameKind",
null,
"preferThrowingProperties",
null,
"true",
null,
"true",
null,
true,
null,
"true",
null,
"true",
"true",
null,
"true",
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
false,
null,
"4",
null,
"4",
null,
"space",
null,
"auto",
null,
false,
"openFiles",
null,
"openFiles",
null,
true,
null,
true,
null,
null,
true
]

[Trace - 12:09:30 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:09:30.379][End]initialized"
}

[Trace - 12:09:30 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:09:30.398][Start]workspace/diagnostic"
}

[Trace - 12:09:30 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] PublicWorkspacePullDiagnosticsHandler(category: , source: ) started getting diagnostics"
}

[Trace - 12:09:30 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] previousResults.Length=0"
}

[Trace - 12:09:30 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] Processing 0 documents"
}

[Trace - 12:09:31 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (2)'.
[Trace - 12:09:31 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:09:31.485][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:09:31 PM] Received response 'workspace/buildOnlyDiagnosticIds - (2)' in 20ms.
Result: {
"ids": []
}

[Trace - 12:09:31 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:09:31.491][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:09:31 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (3)'.
[Trace - 12:09:31 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:09:31.808][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:09:31 PM] Received response 'workspace/buildOnlyDiagnosticIds - (3)' in 10ms.
Result: {
"ids": []
}

[Trace - 12:09:31 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:09:31.809][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:09:32 PM] Received request 'workspace/inlayHint/refresh - (4)'.
Params: []

[Trace - 12:09:32 PM] Sending response 'workspace/inlayHint/refresh - (4)'. Processing request took 0ms
No result returned.

[Trace - 12:09:32 PM] Received request 'workspace/diagnostic/refresh - (5)'.
Params: []

[Trace - 12:09:32 PM] Sending response 'workspace/diagnostic/refresh - (5)'. Processing request took 0ms
No result returned.

[Trace - 12:10:07 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (4)'.
[Trace - 12:10:07 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:10:07.552][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:10:07 PM] Received response 'workspace/buildOnlyDiagnosticIds - (4)' in 2ms.
Result: {
"ids": []
}

[Trace - 12:10:07 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:10:07.553][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:10:12 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (5)'.
[Trace - 12:10:12 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:10:12.760][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:10:12 PM] Received response 'workspace/buildOnlyDiagnosticIds - (5)' in 16ms.
Result: {
"ids": []
}

[Trace - 12:10:12 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:10:12.760][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:10:12 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (6)'.
[Trace - 12:10:12 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:10:12.821][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:10:12 PM] Received response 'workspace/buildOnlyDiagnosticIds - (6)' in 8ms.
Result: {
"ids": []
}

[Trace - 12:10:12 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:10:12.822][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:10:13 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (7)'.
[Trace - 12:10:13 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:10:13.014][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:10:13 PM] Received response 'workspace/buildOnlyDiagnosticIds - (7)' in 3ms.
Result: {
"ids": []
}

[Trace - 12:10:13 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:10:13.015][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (8)'.
[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.380][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Received response 'workspace/buildOnlyDiagnosticIds - (8)' in 2ms.
Result: {
"ids": []
}

[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.380][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (9)'.
[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.424][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Received response 'workspace/buildOnlyDiagnosticIds - (9)' in 1ms.
Result: {
"ids": []
}

[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.425][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (10)'.
[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.468][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Received response 'workspace/buildOnlyDiagnosticIds - (10)' in 3ms.
Result: {
"ids": []
}

[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.469][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (11)'.
[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.645][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Received response 'workspace/buildOnlyDiagnosticIds - (11)' in 44ms.
Result: {
"ids": []
}

[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.645][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (12)'.
[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.871][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:26 PM] Received response 'workspace/buildOnlyDiagnosticIds - (12)' in 18ms.
Result: {
"ids": []
}

[Trace - 12:12:26 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:26.871][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:29 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (13)'.
[Trace - 12:12:29 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:29.009][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:29 PM] Received response 'workspace/buildOnlyDiagnosticIds - (13)' in 3ms.
Result: {
"ids": []
}

[Trace - 12:12:29 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:29.009][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:29 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (14)'.
[Trace - 12:12:29 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (15)'.
[Trace - 12:12:29 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:29.213][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:29 PM] Received response 'workspace/buildOnlyDiagnosticIds - (14)' in 2ms.
Result: {
"ids": []
}

[Trace - 12:12:29 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:29.213][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:29 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:29.214][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:29 PM] Received response 'workspace/buildOnlyDiagnosticIds - (15)' in 2ms.
Result: {
"ids": []
}

[Trace - 12:12:29 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:29.214][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:29 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (16)'.
[Trace - 12:12:29 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:29.219][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:12:29 PM] Received response 'workspace/buildOnlyDiagnosticIds - (16)' in 3ms.
Result: {
"ids": []
}

[Trace - 12:12:29 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:12:29.220][End]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:13:12 PM] Sending request 'workspace/buildOnlyDiagnosticIds - (17)'.
[Trace - 12:13:12 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:13:12.882][Start]workspace/buildOnlyDiagnosticIds"
}

[Trace - 12:13:12 PM] Received response 'workspace/buildOnlyDiagnosticIds - (17)' in 10ms.
Result: {
"ids": []
}

[Trace - 12:13:12 PM] Received notification 'window/logMessage'.
Params: {
"type": 4,
"message": "[LanguageServerHost] [04:13:12.882][End]workspace/buildOnlyDiagnosticIds"
}

Environment information

VSCode version: 1.87.2
C# Extension: 2.22.3
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 8.0.100 Commit: 57efcf1350 Workload version: 8.0.100-manifests.6c33ef20

Runtime Environment:
OS Name: Mac OS X
OS Version: 14.4
OS Platform: Darwin
RID: osx-x64
Base Path: /usr/local/share/dotnet/sdk/8.0.100/

.NET workloads installed:
Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.

Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71

.NET SDKs installed:
7.0.401 [/usr/local/share/dotnet/sdk]
8.0.100 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.23 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.23 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
copilot GitHub 1.172.0 github.copilot-1.172.0
copilot-chat GitHub 0.13.1 github.copilot-chat-0.13.1
csdevkit ms-dotnettools 1.4.29 ms-dotnettools.csdevkit-1.4.29-darwin-x64
csharp ms-dotnettools 2.22.3 ms-dotnettools.csharp-2.22.3-darwin-x64
debugpy ms-python 2024.2.0 ms-python.debugpy-2024.2.0-darwin-x64
EditorConfig EditorConfig 0.16.4 editorconfig.editorconfig-0.16.4
format-code-action rohit-gohri 0.1.0 rohit-gohri.format-code-action-0.1.0
gitlens eamodio 14.9.0 eamodio.gitlens-14.9.0
powershell ms-vscode 2024.0.0 ms-vscode.powershell-2024.0.0
prettier-vscode esbenp 10.1.0 esbenp.prettier-vscode-10.1.0
python ms-python 2024.2.1 ms-python.python-2024.2.1
volar Vue 2.0.6 vue.volar-2.0.6
vscode-dotnet-runtime ms-dotnettools 2.0.2 ms-dotnettools.vscode-dotnet-runtime-2.0.2
vscode-dotnet-watch Murugaratham 1.1.9 murugaratham.vscode-dotnet-watch-1.1.9
vscode-eslint dbaeumer 2.4.4 dbaeumer.vscode-eslint-2.4.4
vscode-github-actions github 0.26.2 github.vscode-github-actions-0.26.2
vscode-icons vscode-icons-team 12.7.0 vscode-icons-team.vscode-icons-12.7.0
vscode-mdx unifiedjs 1.8.1 unifiedjs.vscode-mdx-1.8.1
vscode-pull-request-github GitHub 0.82.0 github.vscode-pull-request-github-0.82.0
vscode-pylance ms-python 2024.3.1 ms-python.vscode-pylance-2024.3.1
vscode-solution-explorer fernandoescolar 0.8.5 fernandoescolar.vscode-solution-explorer-0.8.5
vscode-stylelint stylelint 1.3.0 stylelint.vscode-stylelint-1.3.0
vscodeintellicode-csharp ms-dotnettools 0.1.26 ms-dotnettools.vscodeintellicode-csharp-0.1.26-darwin-x64

Extension version: 2.22.3
VS Code version: Code 1.87.2 (Universal) (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:21:31.043Z)
OS version: Darwin x64 23.4.0
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 4, 3, 4
Memory (System) 32.00GB (6.43GB free)
Process Argv --crash-reporter-id 93b24003-87f9-465a-ad02-896faa25587e
Screen Reader no
VM 0%
@dibarbet dibarbet transferred this issue from dotnet/vscode-csharp Mar 19, 2024
@davidwengier
Copy link
Member

Sorry you're running into this issue. Could you post the output from the Razor Logs category, or run the Report Razor Issue command to capture them?
image

The other thing to check is that the razor.format.enable setting is set to true
image

@johnmgrant
Copy link
Author

I receive an error when I attempt to run the command to report a razor issue:
Screenshot 2024-03-19 at 1 39 56 PM

I still experience the same issue where formatting does not work in *.cshtml files when using the C# extension v2.22.5:
Screenshot 2024-03-19 at 1 40 42 PM

Here are the logs from the original session that I archived. Let me know if the full archive would be helpful.

Razor Logs

-------------------------------------------------------------------------------- Razor.VSCode version 7.0.0-preview.24151.1 -------------------------------------------------------------------------------- Razor's log level is currently set to 'Information' - To change Razor's log level set 'razor.server.trace' and then restart VSCode. - To report issues invoke the 'Report a Razor issue' command via the command palette. -----------------------------------------------------------------------------------------------------------------------------

Using dotnet configured on PATH
[Client - 12:09:27 PM] Razor language server path: /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.razor/rzls
[Client - 12:09:27 PM] Server arguments --logLevel 2 --projectConfigurationFileName project.razor.vscode.bin --DelegateToCSharpOnDiagnosticPublish true --UpdateBuffersForClosedDocuments true --telemetryLevel all --sessionId 2c8f91ca-8239-4e14-9618-ec32208bc3891710432564875 --telemetryExtensionPath /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.razortelemetry/Microsoft.VisualStudio.DevKit.Razor.dll
[Client - 12:09:28 PM] Starting Razor Language Server...
You must install or update .NET to run this application.

App: /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet

The following frameworks were found:
5.0.17 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.22 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.23 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
7.0.11 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
8.0.0 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.14
[Error - 12:09:28 PM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Info - 12:09:28 PM] Connection to server got closed. Server will restart.
true
[Error - 12:09:28 PM] Razor Language Server client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 12:09:28 PM] Client Razor Language Server: connection to server is erroring. Shutting down server.
[Error - 12:09:28 PM] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
at S.shutdown (/Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/dist/extension.js:2:2148204)
at S.stop (/Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/dist/extension.js:2:2147785)
at S.stop (/Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/dist/extension.js:2:2310957)
at S.handleConnectionError (/Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/dist/extension.js:2:2154292)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runNextTicks (node:internal/process/task_queues:64:3)
at processImmediate (node:internal/timers:447:9)
[Error - 12:09:28 PM] Server initialization failed.
Message: write EPIPE
Code: -32099
[Error - 12:09:28 PM] Razor Language Server client: couldn't create connection to server.
Message: write EPIPE
Code: -32099
[Error - 12:09:28 PM] Restarting server failed
Message: write EPIPE
Code: -32099
[Client - 12:09:28 PM] (Error) Failed when activating Razor VSCode.
write EPIPE
Stack Trace:
Error: write EPIPE
at /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/dist/extension.js:2:2097336
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runNextTicks (node:internal/process/task_queues:64:3)
at processImmediate (node:internal/timers:447:9)
[Info - 12:09:28 PM] Connection to server got closed. Server will restart.
true
You must install or update .NET to run this application.

App: /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet

The following frameworks were found:
5.0.17 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.22 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.23 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
7.0.11 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
8.0.0 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.14
[Error - 12:09:28 PM] Client Razor Language Server: connection to server is erroring. Shutting down server.
[Error - 12:09:28 PM] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
at S.shutdown (/Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/dist/extension.js:2:2148204)
at S.stop (/Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/dist/extension.js:2:2147785)
at S.stop (/Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/dist/extension.js:2:2310957)
at S.handleConnectionError (/Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/dist/extension.js:2:2154292)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runNextTicks (node:internal/process/task_queues:64:3)
at processImmediate (node:internal/timers:447:9)
[Error - 12:09:28 PM] Server initialization failed.
Message: write EPIPE
Code: -32099
[Error - 12:09:28 PM] Razor Language Server client: couldn't create connection to server.
Message: write EPIPE
Code: -32099
[Error - 12:09:28 PM] Restarting server failed
Message: write EPIPE
Code: -32099
[Info - 12:09:28 PM] Connection to server got closed. Server will restart.
true
You must install or update .NET to run this application.

App: /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet

The following frameworks were found:
5.0.17 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.22 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.23 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
7.0.11 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
8.0.0 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.14
You must install or update .NET to run this application.

App: /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet

The following frameworks were found:
5.0.17 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.22 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.23 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
7.0.11 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
8.0.0 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.14
[Error - 12:09:28 PM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Info - 12:09:28 PM] Connection to server got closed. Server will restart.
true
[Error - 12:09:28 PM] Razor Language Server client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
You must install or update .NET to run this application.

App: /Users/john.grant/.vscode/extensions/ms-dotnettools.csharp-2.22.3-darwin-x64/.razor/rzls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.1' (x64)
.NET location: /usr/local/share/dotnet

The following frameworks were found:
5.0.17 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.22 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
6.0.23 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
7.0.11 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
8.0.0 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.1&arch=x64&rid=osx-x64&os=osx.14
[Error - 12:09:28 PM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 12:09:28 PM] The Razor Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 12:09:28 PM] Razor Language Server client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 12:09:28 PM] Restarting server failed
Message: Pending response rejected since connection got disposed
Code: -32097

@davidwengier
Copy link
Member

Thanks for the logs. It appears you the server is looking for .NET 8.0.1, which you don't have installed, and so it can't start at all. @dibarbet @ryzngard any ideas why Razor would have a problem here, when Roslyn seemingly doesn't?

@dibarbet
Copy link
Member

dibarbet commented Mar 19, 2024

@davidwengier we specify roll forward "Major" for our server (it comes from the template config in roslyn, but you can also configure it in the csproj).

rzls does not have any rollforward in the rzls.runtimeconfig.json, so won't roll forward to newer versions of .net:

{
  "runtimeOptions": {
    "tfm": "net8.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "8.0.1"
    },
    "configProperties": {
      "System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
      "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
    }
  }
}

I was talking to this with someone on the Razor side but I forget who (and can't find the chat now).

@dibarbet
Copy link
Member

Probably fixed by #10064

@ryzngard
Copy link
Contributor

Ah yea. It's weird though because we used to have roll forward for minor but not major (at least to my recollection) so I would have thought this would not be broken. Either way agree #10064 fixes this issue

@dibarbet
Copy link
Member

@ryzngard since you used to ship self contained roll forward would not apply IIRC

@davidwengier
Copy link
Member

Well I'm glad its fixed, but I still don't understand how roll forward allows 8.0.1 work when only 8.0.0 is installed, but I'm happy if you're happy :)

@dibarbet
Copy link
Member

dibarbet commented Mar 19, 2024

@davidwengier @ryzngard ah thats actually a great point, the PR won't entirely fix the Razor issue. I missed that. Roslyn has this runtime config, so it would rollForward to 8.0.1. I don't know how Roslyn sets it to 8.0.0 though.

{
  "runtimeOptions": {
    "tfm": "net8.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "8.0.0"
    },
    "rollForward": "Major",
    "configProperties": {
      "System.GC.Server": true,
      "System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
      "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
    }
  }
}

@ryzngard
Copy link
Contributor

Oooh, that's a good point. I'm guessing Roslyn doesn't set TargetLatestRuntimePatch to true like Razor does

@dibarbet
Copy link
Member

Indeed we don't. I would guess it is also not necessary for Razor either - if we're not using the version we found on the path, the runtime installer extension is responsible for downloading the latest patch version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants