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

Fix All: Remove unnecessary usings failed #7559

Closed
DarkRRb opened this issue Sep 12, 2024 · 1 comment
Closed

Fix All: Remove unnecessary usings failed #7559

DarkRRb opened this issue Sep 12, 2024 · 1 comment

Comments

@DarkRRb
Copy link

DarkRRb commented Sep 12, 2024

  1. Open any C# code that contains unnecessary usings and press ctrl+ .
  2. Select Fix All: Remove unnecessary usings
  3. Select Project or Solution
  4. Show error:
    JSON deserialization for type 'Microsoft.CodeAnalysis.LanguageServer.Handler.CodeActions.RoslynFixAllCodeAction' was missing required properties, including the following: title

Log

Using dotnet configured on PATH
Dotnet path: D:\Portable\dotnet\bin\dotnet.exe
Activating C# + C# Dev Kit...
waiting for named pipe information from server...
[stdout] {"pipeName":"\\\\.\\pipe\\2d723b39"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info  - 9:57:40 PM] [Program] Language server initialized
[Info  - 9:57:49 PM] [WorkspaceProjectFactoryService] Project D:\***\AliceBot.Core.csproj loaded by C# Dev Kit
[Error - 10:00:28 PM] [LanguageServerHost] System.Text.Json.JsonException: JSON deserialization for type 'Microsoft.CodeAnalysis.LanguageServer.Handler.CodeActions.RoslynFixAllCodeAction' was missing required properties, including the following: title
   at System.Text.Json.ThrowHelper.ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo parent, BitArray requiredPropertiesSet)
   at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](JsonElement element, JsonSerializerOptions options)
   at Microsoft.CommonLanguageServerProtocol.Framework.SystemTextJsonLanguageServer`1.DeserializeRequest[TRequest](Object serializedRequest, RequestHandlerMetadata metadata) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/SystemTextJsonLanguageServer.cs:line 50
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.TryDeserializeRequest[TRequest](AbstractLanguageServer`1 languageServer, RequestHandlerMetadata requestHandlerMetadata, Boolean isMutating, TRequest& request) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 117
Error making codeAction/resolveFixAll request: JSON deserialization for type 'Microsoft.CodeAnalysis.LanguageServer.Handler.CodeActions.RoslynFixAllCodeAction' was missing required properties, including the following: title

Version

VSCode

Version: 1.93.0

Commit: 4849ca9bdf9666755eb463db297b69e5385090e3

Date: 2024-09-04T13:02:38.431Z

Electron: 30.4.0

ElectronBuildId: 10073054

Chromium: 124.0.6367.243

Node.js: 20.15.1

V8: 12.4.254.20-electron.0

OS: Windows_NT x64 10.0.19045

OS version: Windows_NT x64 10.0.22631

Extension

version: v2.45.20

@JoeRobich
Copy link
Member

Thanks for opening an issue. This appears to be a duplicate of #7535. The fix will be in a future version of the C# extension.

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

No branches or pull requests

2 participants