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

Installing NuGet package that is marked as a development dependency doesn't add the PrivateAssets="All" attribute to the PackageReference element #7171

Closed
ygoe opened this issue Aug 6, 2018 · 8 comments
Labels
Style:PackageReference WaitingForCustomer Applied when a NuGet triage person needs more info from the OP

Comments

@ygoe
Copy link

ygoe commented Aug 6, 2018

Here's the details. Unfortunately you seem to have deleted the referenced issue. And Microsoft won't let me comment on their side.

https://developercommunity.visualstudio.com/content/problem/23158/installing-nuget-package-that-is-marked-as-a-devel.html

@mishra14
Copy link
Contributor

mishra14 commented Aug 7, 2018

@ygoe The referenced issue is still available here.

Further, if you see this PR, you will notice that this has been fixed in VS 15.8 release. Have you tried a 15.8 preview?

@mishra14 mishra14 added Style:PackageReference WaitingForCustomer Applied when a NuGet triage person needs more info from the OP labels Aug 7, 2018
@ygoe
Copy link
Author

ygoe commented Aug 8, 2018

No, I'll wait for the release. Do I have to mark the tool package in some way?

@mishra14
Copy link
Contributor

mishra14 commented Aug 8, 2018

You need to add the following to your nuspec file -

<developmentDependency>true</developmentDependency>

You can read more about it here.

@nkolev92
Copy link
Member

@ygoe
Have your problem been resolved?

@ygoe
Copy link
Author

ygoe commented Aug 31, 2018

Well, I have no nuspec file. Just a .csproj file. Can I just put everything in there?

@nkolev92
Copy link
Member

@ygoe
Yes you can set the metadata,
<DevelopmentDependency>true</DevelopmentDependency>

@ygoe
Copy link
Author

ygoe commented Aug 31, 2018

Yes, that helps. My NuGet package is now automatically installed as private and will not show up as a dependency in a third project. Thank you!

@nkolev92
Copy link
Member

Sounds good.

Thanks for following up.

Closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Style:PackageReference WaitingForCustomer Applied when a NuGet triage person needs more info from the OP
Projects
None yet
Development

No branches or pull requests

3 participants