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

Add "dotnet nuget install" command #12513

Open
akoeplinger opened this issue Mar 29, 2023 · 8 comments
Open

Add "dotnet nuget install" command #12513

akoeplinger opened this issue Mar 29, 2023 · 8 comments
Assignees

Comments

@akoeplinger
Copy link

akoeplinger commented Mar 29, 2023

NuGet Product(s) Involved

dotnet.exe

The Elevator Pitch

Related to #4855

We had multiple internal teams at MSFT who are doing a migration to Mariner reach out to us when moving from Mono's nuget(which is just the nuget.exe CLI) to the dotnet CLI and one common pain point was the missing support for the install command.

Most of these teams are not even using .NET but have some tool which is hosted on an internal AzDO feed and they were using nuget install <tool> e.g. from CMake to grab the assets. Right now you need to create a dummy .csproj like this so you can run dotnet restore on it which makes this a lot more complicated:

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
   <OutputType>Exe</OutputType>
   <TargetFramework>net6.0</TargetFramework>
   <RestorePackagesPath>packages</RestorePackagesPath>
</PropertyGroup>

<ItemGroup>
  <PackageDownload Include="Some.Internal.Tool" Version="[7.0.7]" />
</ItemGroup>

</Project>

It'd be great if we could get dotnet nuget install supported in the future 😄

Additional Context and Details

No response

Please 👍 or 👎 this comment to help us with the direction of this feature & leave as much feedback/questions/concerns as you'd like on this issue itself and we will get back to you shortly.

@JonDouglas
Copy link
Contributor

JonDouglas commented Jul 24, 2023

Adding a quick comment here.

We've had a number of requests for this specific feature. Basically the concept is to acquire a NuGet package without a .csproj and without being so tied down to a project system to get an asset to disk.

We want to continue to collect upvotes and scenarios for this experience, so I've edited the description to help us do so.

Some of the additional scenarios we have heard regarding this are:

  1. Wanting to download a NuGet package to run security health checks with (See https://github.com/ossf/scorecard)
  2. Wanting to download a NuGet package without a dummy .csproj / project system attachment.
  3. Wanting to download a NuGet package as the equivalent of NuGet.org's raw nupkg download (i.e. Download package)
  4. Wanting to download a NuGet package without any client or server-side validation performed.
  5. Wanting to download a NuGet package similar to nuget.exe install <packageid> -OutputDirectory <directory>, npm install <package id> --prefix <prefix>, pip install <package id> --target <target>, etc.

Please feel free to share your scenarios if you're reading this comment!

Also related to #6849

@vlm---
Copy link

vlm--- commented Jul 25, 2023

Ours is scenario no. 3: pure downloading of newest packages by name to populate a feed in an offline environment.

@deitry
Copy link

deitry commented Jul 26, 2023

Ours is no.5. We use GitHub NuGet private registry for binaries distribution, and specifically we have to download packages and extract binaries for Unity project. Sadly, Unity can not handle it by internal package management system, neither does NuGetForUnity.

@nkolev92 nkolev92 added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Triage:NeedsTriageDiscussion labels Apr 8, 2024
@jeffkl jeffkl removed the Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. label Jun 13, 2024
@jeffkl jeffkl added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Triage:NeedsTriageDiscussion labels Jun 13, 2024
@616b2f
Copy link

616b2f commented Aug 23, 2024

Ours is 5: download and extract binaries from nuget package to a local folder.

@mzorzella-simeon
Copy link

+1 Ours is 5: download and extract binaries from nuget package to a local folder.

@marcopelegrini
Copy link

+1 to embed a cross platform cli to a nodejs application

@nkolev92 nkolev92 added Priority:2 Issues for the current backlog. and removed Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Triage:NeedsTriageDiscussion labels Sep 23, 2024
@snnn
Copy link

snnn commented Oct 4, 2024

Our team uses nuget.org to distribute native DLLs(and *.so/dylibs) for different platforms. From security and compliance perspective, it is the best way of doing this as NuGet is a standard package manager and it has excellent codesign verification mechanism. It helps protect our supply chain. On the other hand, I see some big companies use PyPI to distribute their native DLLs but python packages today still do not support any of kind of codesign. NuGet is better and more secure. I hope it also could be easier to use.

@natke
Copy link

natke commented Oct 4, 2024

+1

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