Skip to content

Item already exists error when creating/removing projects in workspace #2299

@captainsafia

Description

@captainsafia

Describe the Issue

When creating a new Web API project, opening it in VS Code, removing all files, and then trying to create another Web API project in the same directory, an error occurs stating that an item already exists.

Steps To Reproduce

  1. Create a new directory and navigate to it:

    mkdir test
    cd test
  2. Create a new Web API project:

    dotnet new webapi
  3. Open the project in VS Code:

    code .
  4. Remove all files from the directory:

    rm -rf *
  5. Attempt to create a new Web API project again:

    dotnet new webapi

Expected vs Actual Behavior

Expected: The dotnet new webapi command should successfully create a new Web API project in the empty directory.

Actual: An error appears indicating that an item already exists, preventing the creation of the new project.

Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions