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.org Bug]: Please fully qualify NuGet\Install-Package on the installer tab #9201

Closed
potatoqualitee opened this issue Aug 22, 2022 · 8 comments

Comments

@potatoqualitee
Copy link
Contributor

Impact

It's more difficult to complete my work

Describe the bug

As a PowerShell Developer, I am excited to see a PowerShell install command on each package.

image

But it always fails because -Version does not exist in my Install-Package command. Only -RequiredVersion exists.

image

After talking to others who figured this out, I now understand that there are two distinct Install-Package commands with incompatible parameters.

Repro Steps

  1. Open up a Windows PowerShell console, not a VS Developer console.
  2. Run Install-Package Microsoft.Playwright -Version 1.25.0
  3. This uses Install-Package from Microsoft's PackageManagement module
  4. Fail

Expected Behavior

Whatever is provided on NuGet.org should work.

Considering the naming convention is problematic, please fully qualify the command on the website so that end-users have a hint that there are two commands from Microsoft with the same name that are different.

NuGet\Install-Package Microsoft.Playwright -Version 1.25.0

Alternatively, please rename your command to Install-NuGetPackage for better alignment and clarity.

The "Package Manager Console" is also confusing to people who aren't intimately familiar with Visual Studio. Perhaps add a PowerShell tab with the proper syntax right after the Cake tab.

image

In that tab would be

PackageManagement\Install-Package Microsoft.Playwright -RequiredVersion 1.25.0

Screenshots

No response

Additional Context and logs

No response

@joelverhagen
Copy link
Member

This is an excellent suggestion. The confusion between the Package Manager Console's Install-Package (used historically within VS) and Install-Package in non-VS PowerShell (for PowerShell package management) is a great source of confusion.

Renaming the command is outside of the scope of NuGet.org. Furthermore, I think it would be a very tough request to fulfill since that's a breaking change and (IIRC) investments in the PMC are limited these days.

I think having some clarification around this tab (that it should be used within the VS PMC) would also help. Maybe some note like the PackageReference tab has that helps users understand where this command is used and why there is the NuGet\ qualifier.

@joelverhagen
Copy link
Member

joelverhagen commented Aug 22, 2022

@potatoqualitee (or anyone else on this thread), are you interested in opening a PR to add the NuGet\ qualifier as well as adding note around where this command is used? Maybe linking to https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-powershell? This seems like a great "Up for grabs" issue that a community member can gets started on contributing with.

@potatoqualitee
Copy link
Contributor Author

Thanks! I'll see what I can do.

@joelverhagen
Copy link
Member

Thank you @potatoqualitee for your contribution! We'll work on getting this out to NuGet.org.

@potatoqualitee
Copy link
Contributor Author

Thank you for the acceptance and assist!

@joelverhagen
Copy link
Member

This is deployed on www.nuget.org. Thanks again for your contribution!

@potatoqualitee
Copy link
Contributor Author

Looks so good, I told all my friends 😅

image

@potatoqualitee
Copy link
Contributor Author

Thanks again for the assist 💯 100/100, would PR again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants