Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuget.exe install with -ExcludeVersion will match existing directories that have a version #13368

Open
hickford opened this issue Apr 3, 2024 · 0 comments
Labels
Functionality:Install The install command in VS/nuget.exe Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Type:Bug

Comments

@hickford
Copy link

hickford commented Apr 3, 2024

NuGet Product Used

NuGet.exe

Product Version

6.9.1.3

Repro Steps & Context

Confusing behaviour when installing with and without ExcludeVersion

If you install a package with and without option ExcludeVersion:

nuget.exe install Moq -Version 4.9.0 -ExcludeVersion
nuget.exe install Moq -Version 4.9.0

You get two installations in folders Moq and Moq.4.9.0 as expected.

But if you try the same commands in reverse order:

nuget.exe install Moq -Version 4.9.0
nuget.exe install Moq -Version 4.9.0 -ExcludeVersion

You get just one installation Moq-4.9.0. The second command prints message:

Package "Moq.4.9.0" is already installed.

This is confusing. I expected a second installation in folder Moq as above.

@hickford hickford changed the title Confusing behaviour when installing with and without ExcludeVerison Confusing behaviour when installing with and without ExcludeVersion Apr 3, 2024
@zivkan zivkan added Product:NuGet.exe NuGet.exe Functionality:Install The install command in VS/nuget.exe and removed Triage:Untriaged labels Apr 5, 2024
@zivkan zivkan changed the title Confusing behaviour when installing with and without ExcludeVersion nuget.exe install with -ExcludeVersion will match existing directories that have a version Apr 5, 2024
@nkolev92 nkolev92 added the Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Install The install command in VS/nuget.exe Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Type:Bug
Projects
None yet
Development

No branches or pull requests

3 participants