[Bug]: No context-menu action to add an existing project to a solution

Abierto
#576 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
66/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript, vscode

Línea de trabajo

Read the command contribution in src/editors/vscode/package.json and its implementation in src/scaffolding.ts, then trace how Solution Explorer distinguishes solution and project nodes. Add the context-menu actions for both cases described in the issue, including projects shown without a solution. Done means the actions appear in the relevant menus and let users add an existing project to a solution.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
What happened?

The Solution Explorer has no way to add an existing project to an existing solution. Right-clicking a project shows only Build / Clean / Rebuild / Consolidate Packages / Remove Unused Packages / Copy Name. Nothing on the solution node does it either.

The command already exists: sharplsp.addProjectToSolution is in src/editors/vscode/package.json and implemented in src/scaffolding.ts. But it has no contributes.menus entry, so you can only run it from the Command Palette.

The gap is worst when the solution is empty (<Solution></Solution>) or doesn't reference the project. The explorer shows the project with no solution node above it, so there's nothing to right-click to fix it.

Steps to reproduce
  1. Make a folder with an SDK App.csproj and an empty App.slnx (dotnet new sln --format slnx).
  2. Open it in VS Code with SharpLsp 0.33.0.
  3. Right-click the project, or the solution, in the Solution Explorer.
  4. There is no "Add Existing Project…" / "Add to Solution" item.

Expected:

  • On a solution node: "Add Existing Project…" opens a file picker for .csproj/.fsproj and runs addProjectToSolutionFile.
  • On a project node that isn't in any solution: "Add to Solution…" lets you pick a solution from the workspace.
  • When a project is shown without a solution, the user still has a context-menu way to add it to one.

Related: #575 (standalone csproj only loaded when a solution references it).

Component

VS Code extension

Language

C#

SharpLsp version

0.33.0 (latest release, v0.33.0)

Editor & OS

VS Code, macOS 26.7.1

Lenguaje dominante
TypeScript
Estrellas
185
Forks
12
Merge medio
7 h 33 min
PR fusionados (30 d)
63

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Nimblesite/SharpLsp

Todos los issues de Nimblesite/SharpLsp

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.