-
Notifications
You must be signed in to change notification settings - Fork 391
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
Project reference in new csproj format do not obey PriveAssets? (VS2017 15.4) #2909
Comments
@philippe-lavoie take a look at: https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets Based on your description you might be looking for Here are some examples:
|
I have the second situation you mention and ProjectA does see the nuget reference to BasicModule. You are implying it does not see it, but it does. To be clear, the configuration is Unit Test -> BasicModule -> (PrivateAssets=All) BasicModuleContract i.e. the BasicModuleContract is linked by BasicModule as a private assets This is bad when content files are also promoted by this bug. I have a nuget that has content files and even with PrivateAssets=All, those files still get promoted and included in a project that has a PackageReference to it or any project referencing it afterwards. ProjectA / contentFiles / Bob.txt ProjectB -> Project A (PrivateAssets=All) when you look inside visual Studio, Bob.txt is still showing up inside ProjectC. |
This issue was moved to NuGet/Home#6098 |
@philippe-lavoie let's continue debugging this at NuGet/Home#6098 @Pilchie this can be closed, I don't think this is related to the project system. |
Thanks @emgarten closing as external. |
According to issue 2313, when adding below inside BasicModel, it should stop the reference from flowing to other projects.
However, inside my unit tests, which does a project reference to BasicModel, the project.assets file contains the following
So, chaining is definitely still occurring.
The text was updated successfully, but these errors were encountered: