What command can I use to remove a project in .NET Core?
The project I want to remove was created with the help of the command:
dotnet new webapi
Is it true that there is still no command for this? It was pointed out here.
When you run the command dotnet new [type]
, dotnet will create a project in whatever folder the current working directory is. (where [type] will be something like console or webapi)
You never want to run this command without first creating a sub-directory and changing to it or you will have a mess of files sitting somewhere you will wish they weren't. The amount of files and their names will depend on the type of project you are making.
If you make this mistake and don't know which files to delete, you can delete them individually.
dotnet new [type]
command in that directory. If you made a sub-directory to begin with, you can simply:
rd /s /q <dirname>
rm -rf <dirname>
to clean up the mess.