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

netcore projects don't support setting as developmentDependency #4694

Closed
clairernovotny opened this issue Feb 26, 2017 · 10 comments
Closed

netcore projects don't support setting as developmentDependency #4694

clairernovotny opened this issue Feb 26, 2017 · 10 comments

Comments

@clairernovotny
Copy link

The current Pack targets don't seem to have a way to specify developmentDependency for the generated NuSpec. This leaves a gap when creating packages intended to be used at build-time only.

@emgarten
Copy link
Member

emgarten commented Feb 26, 2017

Set PrivateAssets=all in the PackageReference

See also: #4125

@clairernovotny
Copy link
Author

clairernovotny commented Feb 26, 2017

Not what I'm talking about -- I'm talking about creating a library/package that has developmentDependency set to true in its metadata.

That other issue is about consuming PackageRefs and turning those into dependencies or not.

@emgarten
Copy link
Member

Oh I see, to write this into the nuspec for a new package 😄

That doesn't exist currently since the developmentDependency flag is not supported for PackageReference yet, this would be good to fix along with #4125

//cc @rohit21agrawal

@davidfowl
Copy link
Member

davidfowl commented Feb 27, 2017

This is only useful if we do #4125 (which we should)

@AArnott
Copy link
Contributor

AArnott commented Mar 20, 2017

@davidfowl I agree we should fix #4125, but fixing this is absolutely useful even without that. I can't build packages that are consumed downlevel without this feature. I'm trying to migrate my nerdbank.gitversioning package over to your new pack targets and I am blocked because if I start releasing packages that are missing this metadata, everyone using packages.config will regress when they use my latest package.

@AArnott
Copy link
Contributor

AArnott commented Mar 20, 2017

In trying to workaround the problem by using the $(NuspecFile) property as a template, I find I can specify <developmentDependency>true</developmentDependency> but then the files being packaged go to heck. Either I specify <files /> section and get an error about no content, or remove that section and I get the whole project directory instead of the binaries and dependencies all nicely laid out as I had (highly customized) before.

AArnott added a commit to dotnet/Nerdbank.GitVersioning that referenced this issue Mar 20, 2017
@bricelam
Copy link

+1 to @AArnott's comments. We lose a lot of MSBuild magic by "dropping down" to nuspec. Using <NuspecProperties> helps a bit, but we still end up re-implementing (i.e. hard-coding) a lot of it.

@clairernovotny
Copy link
Author

This needs to be reopened... this doesn't actually work in either 4.3 or the 2.0 preview 1 tooling... the MSBuild.Build.Tasks.Pack.Targets don't have any mention of DevelopmentDependency in them.

@rohit21agrawal
Copy link
Contributor

your nuget.build.tasks.pack.dll version please?

@clairernovotny
Copy link
Author

In the tools preview 1 SDK, it's 4.3.0.2418

@rrelyea rrelyea changed the title Pack targets don't support setting developmentDependency netcore projects don't support setting as developmentDependency Aug 10, 2017
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

6 participants