-
Notifications
You must be signed in to change notification settings - Fork 253
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
Update of a Package should not modify PrivateAssets of a PackageReference #7285
Comments
is Fody version 3.0.1 marked as a developmentDependency? If so, then this is the intended behavior and introduced as part of 15.8 update of visual studio |
But that is a breaking change |
also i think this is still a bug. someone building a fody addin explicitly wants
an upgrade should not change that explicit decision. |
This change brakes every single package where build and lib are somehow connected! Example: Then I have a solution which use the package. It has dependencies like the following: Case: developmentDependency=true Case: developmentDependency=false |
@SimonCropp When you already had @pamidur The idea behind setting Your another case of build not flowing transitively is another issue which we're working on and hopefully will have some better end to end experience there. |
@jainaashish I'm cool with transient I my case the order of actions:
What's wrong with |
build transitive issue# #6091 I don't understand why your build alter IL type from lib... that doesn't sound right. And excluding compile isn't a limitation instead the right implementation for this |
Thanks, This sounds totally inconsistent: This flag includes build and analyzers, and exludes compile. But then it makes private everything. And even doesn't include this package to dependency on pack. I'd expect this flag either means dependency to this package is not transient or this package doesn't have dlls to reference. But not both! This weird combination is the limitation and ruins tons of use cases. As for my case. My lib contains attributes, after compilation they are replaced with some IL instructions in marked methods. |
for a repro download this https://github.com/Fody/Caseless/archive/97f648181221fe333f9a660604b1dd50ed091f66.zip and do a nuget update |
@SimonCropp updating from NuGet manager UI worked fine but I could repro it when I updated from NuGet powershell command. Are you also reproing it through PMC? |
@pamidur if a Project (ProjectA) consumes a Package (PackageB) and references a DLL in it, then how can you have it not be transient and expect consumers of ProjectA to be not broken? |
@rohit21agrawal , attributes and references are removed from ProjectA after compilation by supplied build.targets in ProjectB package. That's why I rather consider it to be "developmentDependency" |
@jainaashish no, i can repro through the ui |
At least excluding compile assets should be mentioned in documentation. Currently it states that developmentDependency (2.8+) A Boolean value specifying whether the package is be marked as a development-only-dependency, which prevents the package from being included as a dependency in other packages. |
how can this not be considered a breaking change? |
@SimonCropp I still can't repro it from UI, can you make a repro video and share? or tell me EXACT repro steps to repro it locally... So far I can only repro it in PMC. @iskiselev good point I'll get the doc updated accordingly. |
@jainaashish i dont think it matters "how u repro it". just that u can. arguably if the PMC is behaving differently from the UI i would consider that another bug |
I guess this is the similar issue #7084 In fact I suggest developmentDependency do this: <ItemGroup>
<PackageReference Update="DevelopmentDependencyPackage">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>all</IncludeAssets>
</PackageReference>
</ItemGroup> |
@SimonCropp I'm not saying this isn't a bug with PMC, just trying to understand all scenarios hence its important to know where all this repros and how... |
Merged to 4.9.0 with 6d77978a8dd2b3f07851cc953e85333bb4950deb |
can this be re-opened. it is still happening |
before update
after update
the problems is the first one results in the resultant nuget having a dependency on fody. the second one does not.
The text was updated successfully, but these errors were encountered: