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

Build dependencies carry over to Nugetizer package #6041

Closed
mhutch opened this issue Oct 16, 2017 · 3 comments
Closed

Build dependencies carry over to Nugetizer package #6041

mhutch opened this issue Oct 16, 2017 · 3 comments
Assignees
Labels
missing-required-type The required type label is missing. Product:NuGetizer A 1st party alternative to pack

Comments

@mhutch
Copy link

mhutch commented Oct 16, 2017

There is no way to stop library packages referenced by my project (such as Microsoft.Build.Framework) becoming dependencies of my package.

This is a big problem when I'm writing a build package, because it references Microsoft.Build.Framework), but I don't want that dependency to transfer to my consumers. I can't use PrivateAssets=All because I don't want the MSBuild assemblies bundled into my output directory either.

On possible fix would be IsDevelopmentDependency=true metadata on the PackageReference, it is not included as a dependency of the produced package. This is orthogonal to whether/how the assets are consumed, as controlled by PrivateAssets. This could also be Pack=false for consistency with other item types, though that seems weird semantically.

I would also suggest that we default to this behavior when the primary output type is build.

@mhutch mhutch added the Product:NuGetizer A 1st party alternative to pack label Oct 16, 2017
@gravypower
Copy link

this is exactly what I was looking for this morning, is there any plans to include it?

kzu added a commit to devlooped/nugetizer that referenced this issue Sep 29, 2020
Since the PrivateAssets attribute is not a good fit in this scenario (see NuGet/Home#6041), use the common Pack metadata attribute and default it to false for MSBuild dependencies by default for build package kind.

Fixes NuGet/Home#6041
@kzu
Copy link

kzu commented Sep 30, 2020

Fixed and shipped in 0.3.0-beta of nugetizer.

@ghost
Copy link

ghost commented Jan 16, 2024

@kzu Issue is missing Type label, remember to add a Type label

@ghost ghost added the missing-required-type The required type label is missing. label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing-required-type The required type label is missing. Product:NuGetizer A 1st party alternative to pack
Projects
None yet
Development

No branches or pull requests

5 participants