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

Exclude feature doesn't work when using PackageReferences and .NetStandard #6399

Closed
JKennedy24 opened this issue Jan 8, 2018 · 3 comments
Closed
Milestone

Comments

@JKennedy24
Copy link

JKennedy24 commented Jan 8, 2018

I am trying to use the Exclude feature outlined here: https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#excluding-references

I have a .Net standard 1.4 library and a UWP project.

I have added a nuget package to my UWP project using the PackageReference technique and added the Exclude="All" flag to my packagereference but the libraries are still included and causing a build conflict.

The following Package reference format does not work:

<PackageReference Include="PackageC" Version="1.0.0" Exclude="All" />

@rohit21agrawal
Copy link
Contributor

use ExcludeAssets instead of Exclude

@nkolev92
Copy link
Member

nkolev92 commented Jan 9, 2018

As @rohit21agrawal pointed out. There's a mistake in the docs.

I've already filed a PR to get that fixed.
NuGet/docs.microsoft.com-nuget#641

The correct usage is shown here:
https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets

Apologies for the inconvenience again.

@JKennedy24
Copy link
Author

Thanks.

Using ExcludeAssets worked. Hopefully get that PR merged soon

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

3 participants