microsoft / microsoft/vscode-dotnettools

[SUGGESTION] Allow to add existing/move the projects to the desired solution folder

Open
#557 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-solution enhancement
Dominant language
No language data
Stars
321
Forks
54
Avg merge
2d 19h
Merged PRs (30d)
2

Description

Describe the feature you'd like

Current Limitation: Once we add the project to the solution or if we already have a solution with projects. We can't add existing projects to the desired Solution folder as well as move projects between solution folders. It shows error "The Solution already contains an item named 'project name'."

In Visual Studio, we can just drag and drop the projects in-and-out of the Solution folder.

  1. Allow to add existing projects to the desired Solution folder even if it's already existing in the sln file.
  2. Allow to move the projects between different Solution folders.
     
Alternatives considered
  1. Removed the project from the sln file as mentioned below.
  • In Solution Explorer, Right-Click on that project and select Remove.

  • In dotnet CLI, dotnet sln <SLN_FILE> remove <Project_FILE>

  1. Added it to the desired Solution folder as mentioned below.
  • In Solution Explorer, using Add Existing Project on that Solution folder.

  • In dotnet CLI, dotnet sln <SLN_FILE> add <Project_FILE> --solution-folder <SOL_FOLDER>

Environment Information
  • OS: Windows 11
  • VS Code Version: 1.82.2
  • Extension: C# Dev Kit v0.4.10

Contributor guide

No contributing guide indexed for this repository

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 in the C# Dev Kit's Solution Explorer handling and trace how existing projects and .sln solution folders are processed. Use the reported Add Existing Project and dotnet sln add --solution-folder flows as references; done means an existing project can be added to a chosen folder and moved between folders without the duplicate-item error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, vscode
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.