-
Notifications
You must be signed in to change notification settings - Fork 252
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 PrivateAssets? (VS2017 15.4) #6098
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:
|
From @philippe-lavoie on October 25, 2017 13:42 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. |
@philippe-lavoie would you share the obj/project.assets.json file for ProjectC (the root project)? |
I've seen similar behaviour where I think I had to delete .vs folder or obj and maybe restart VS for things to catch up |
Not PackageReference but rather ProjectReference. I think we're talking about internally distributed assets here, do not necessarily require a full on NuGet package for internal delivery. Is this still a thing? Is this a NuGet issue or an MSBuild issue? We are doing something similar, we are looking for an analog, if not the same, as the PackageReference/PrivateAssets path for ProjectReference, if possible. |
I am experiencing this issue too in Visual Studio 2019 |
From @philippe-lavoie on October 19, 2017 13:46
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.
Copied from original issue: dotnet/project-system#2909
The text was updated successfully, but these errors were encountered: