dotnet / dotnet/roslyn

[VS Code] [Cohosting] C# code actions with fix all support don't work

Open
#85,300 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Razor
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

Roslyn has custom commands in VS Code that handle fix all in code actions, and that system doesn't work for Razor documents.

The command routes the request to Roslyn's code action resolve endpoint, so we probably just need to detect that the code action is happening in a Razor document, and route the request through to Razor. In theory we would do this by wrapping the data in the request and adding a document, and whatever else Razor requires, then the request would be routed to Razor, unwrapped, and it would route to the Roslyn code action resolve endpoint.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the VS Code custom commands that route code actions to Roslyn's code action resolve endpoint, then compare the request path for Razor documents. Done means C# fix-all code actions work in Razor documents through the Razor-to-Roslyn routing described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.