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

Shorten PackageReference XML for DevelopmentDependency packages #8098

Open
khellang opened this issue May 6, 2019 · 2 comments
Open

Shorten PackageReference XML for DevelopmentDependency packages #8098

khellang opened this issue May 6, 2019 · 2 comments
Labels
Functionality:Restore Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time Style:PackageReference Type:DCR Design Change Request
Milestone

Comments

@khellang
Copy link

khellang commented May 6, 2019

Today, installing a package with developmentDependency set to true results in the following XML:

<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.138">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

This is quite a lot of "stuff" and is pretty hard to write manually. This came up when adding NuGet/NuGetGallery#7124, which will now show the XML in the NuGet gallery:

NuGet Gallery

What would it take to make to "teach" the PackageReference node about DevelopmentDependency to make it a first-class citizen? Somethink like this:

<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.138" DevelopmentDependency="True" />

Has that ship sailed? Was this considered when it was implemented?

@nkolev92
Copy link
Member

nkolev92 commented May 8, 2019

That was discussed somewhat in the original issue, among other options :)

#4125

Development Dependency itself is flawed in the multi assets world of PackageReference.
Personally I would've rather seen a new item type for dev dependencies.

Regardless, feel free to go through the comments there, but the gist is that having many switches that mean the same thing will be painful.

I think the below is equivalent to what's currently being written, but I don't remember why the above one was chosen.

<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.138">
  <PrivateAssets>all</PrivateAssets>
  <ExcludeAssets>compile</ExcludeAssets>
</PackageReference>

@ghost ghost added the Status:Inactive Icebox issues not updated for a specific long time label Sep 1, 2022
@Nirmal4G
Copy link

We now have GlobalPackageReference doing the same thing. @jeffkl implemented this.

@jeffkl jeffkl added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Pipeline:Icebox labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Restore Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time Style:PackageReference Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

6 participants