-
Notifications
You must be signed in to change notification settings - Fork 258
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 request: Installation of nuget packages with custom types #10468
Comments
cc @JonDouglas too |
Hey @augustoproiete! We briefly reviewed this feature request alongside NuGet/NuGetGallery#8381. As mentioned on a tweet last month this is an area we're thinking about. NuGet hosts many different package types, and to support all of the package types today, we're working to understand the needs of each type such as Custom types are an area we need to understand more. Packages are already multi-purpose. They can serve as a We think the goal of your proposal resonates with many in the ecosystem & we're going to have to investigate these scenarios closer to see if there's future possibilities of backwards compatibility for the two scenarios you mentioned(VS & NuGet.exe).
I took an initial look at these two proposal scenarios & found some initial logic. It seems that this Regardless, we'll need a bit more time to see the feasibility of making |
Hi @JonDouglas, i hope this is the right place. One package type that I would really like to see is a |
Any news on this proposal? |
* Enable dotnet pack without a .nuspec file fixes #283 * Update readme * Set package type * avoid breaking change * Update TestProject * Remove property * Move Pack item to Props * Remove PackageType to fix VS NuGet restore issue * Update readme * Simpler * Remove package type to avoid confusion see NuGet/Home#10468
It seems that "Proposal B" outlined in the original issue is already almost supported. Below is an outline of where I think we are:
I am a contributor in NuGet/NuGet.Client#5991 and will do my best to unblock that ASAP. Not sure if @JonDouglas @nkolev92 @zivkan would agree, but it seems to me that if NuGet/NuGet.Client#5991 is unblocked then |
Background
Currently, a NuGet package can have a custom PackageType defined by the package author, which is currently used for different purposes, including the filtering in the NuGet gallery as well as changing the behavior of the command palette (as it's the case with .NET Tools)
Problem statement
Installing a package that has an custom package type as of this writing (.NET v5.0.102, VS2019 v16.8.4, NuGet v5.8.1) works as following
Dependency
package typeDependency
package type✅ Log output of `dotnet add package` to install work... (click to expand)
✅ Log output of MSBuild restore when using a custom package type... (click to expand)
❌ Error message from Visual Studio when using a custom package type...
❌ Error message from NuGet.exe when using a custom package type...
The documentation states that:
Which explains the error in Visual Studio, and NuGet.exe...
Goal
Enable package authors to be able to leverage the custom package type feature without losing the ability to install packages.
Proposal A
Update Visual Studio and NuGet.exe to ignore custom package types it doesn't know about, and execute the installation process for a
Dependency
package by default, as dotnet.exe and MSBuild.exe seem to be doing today.Better yet, assume
Dependency
orDotnetTool
depending on the command being executed (e.g.dotnet add package
->Dependency
/dotnet tool install
->DotnetTool
) for package types that are unknown to the client.Proposal B
Allow package authors to specify more than one package type, so that a package can be classified with a custom package type and, at the same time, be installed through the Visual Studio NuGet Package Manager UI as any other
Dependency
nuget package can be;Make the necessary updates as needed in the NuGet client, NuGet Package Manager UI, NuGet Gallery, to be able to handle multiple package types.
e.g.
In this scenario, dependency package type should be allowed for installation even if you have an additional, unrecognized package type.
The examples above use a proof-of-concept package published on nuget.org with the ID Cake.PackageType.Addin which has its package type set to
CakeAddin
./cc @joelverhagen @anangaur, @jcjiang
The text was updated successfully, but these errors were encountered: