Skip to content

dotnet package remove throws an error if the project is not specified #49313

Closed
@marcpopMSFT

Description

@marcpopMSFT

This appears to be a regression in the new dotnet package remove that doesn't repro in the original dotnet remove package.

Not working:
C:\test\repro>dotnet package remove System.Text.Json
Unhandled exception: Value cannot be null. (Parameter '_fileOrDirectory')

Working:
C:\test\repro>dotnet remove package System.Text.Json
info : Removing PackageReference for package 'System.Text.Json' from project 'C:\test\repro\repro.csproj'.

Working
C:\test\repro>dotnet package remove System.Text.Json --project repro.csproj
info : Removing PackageReference for package 'System.Text.Json' from project 'repro.csproj'.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions