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

[Feature]: Move public API from NuGet.CommandLine package to a consumable package #11020

Closed
DJackman123 opened this issue Jul 12, 2021 · 3 comments
Labels
Functionality:SDK The NuGet client packages published to nuget.org Type:Feature

Comments

@DJackman123
Copy link

NuGet Product(s) Involved

NuGet.exe

The Elevator Pitch

The NuGet.CommandLine package isn't supposed to be a public API but contains many useful classes and interfaces that really should be a public API. Please extract the public classes, interfaces, enums, etc. from NuGet.exe into a new dll in its own, consumable, package.

Additional Context and Details

Our team is asking for some custom tools to help with NuGet dependency management across all of our product repos. I have hacked together a couple of proof-of-concept tools that are working fairly well. I would like to re-use as much of the existing NuGet code as possible via the public packages. However, I'm using a lot of symbols from NuGet.exe right now and this requires a bit of hacking in the csproj to make it work. It would be much easier to do this if these public symbols (like IConsole, MsBuildUtility, ILogger, RestoreTargetGraph, RemoteDependencyWalker, ExternalProjectReference, and more) were contained in a dll from a consumable package.
This would also take a step towards fixing the problem reported in issue #5766 (which shows that others would like to use these public APIs as well).

@heng-liu
Copy link
Contributor

Hi @DJackman123 , thanks for filing this issue!
May I know if this is an ask for publishing symbols of NuGet.* packages? As I saw the examples, like RestoreTargetGraph is from package NuGet.Commands and it's already a public API. RemoteDependencyWalker is from package NuGet.DependencyResolver.Core and it's also an public API.
If it's about publishing symbols, there is a tracking issue: #10463

If it's about NuGet.CommandLine package, this is a NuGet.exe and it's not meant to be a public API.
May I know what kind of APIs you'd like to have? Thanks!

@heng-liu heng-liu added the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Jul 13, 2021
@DJackman123
Copy link
Author

No, this is not about publishing symbols. And you're right, some of the classes and interfaces I'm using from NuGet.CommandLine are available as public APIs from different NuGet packages. So, let me start over.

I'm building a custom tool for my team that does some things related to NuGet.exe. I would like to use as much of the NuGet public APIs as possible so I don't have to re-invent any code. There are a few classes and interfaces in NuGet.exe that are not in a public API that I am wanting to use (and as I continue in my development there may be more code from NuGet.CommandLine that I would like to use):

  • NuGet.CommandLine.IConsole
  • NuGet.CommandLine.Console
  • NuGet.CommandLine.MsBuildUtility
  • NuGet.CommandLine.MsBuildToolset

What I'm asking is that these classes and interfaces be provided as a public API because (as you said) NuGet.exe is not meant to be a public API.

@ghost ghost added WaitingForClientTeam Customer replied, needs attention from client team. Do not apply this label manually. and removed WaitingForCustomer Applied when a NuGet triage person needs more info from the OP labels Jul 13, 2021
@heng-liu heng-liu added Functionality:SDK The NuGet client packages published to nuget.org and removed Triage:Untriaged labels Jul 19, 2021
@zkat
Copy link
Contributor

zkat commented Jul 19, 2021

Changing these packages such that they could work as libraries would be a significant amount of work on our end, as well as a maintenance cost.

We recommend that if you want to use the logic in these files, feel free to copy the logic over (with appropriate attribution when you redistribute), but we will not be publishing this ourselves.

Thanks for your request, and best of luck with your project!

@zkat zkat closed this as completed Jul 19, 2021
@jeffkl jeffkl removed the WaitingForClientTeam Customer replied, needs attention from client team. Do not apply this label manually. label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:SDK The NuGet client packages published to nuget.org Type:Feature
Projects
None yet
Development

No branches or pull requests

4 participants