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

Fix transitive contentFiles support that's missing in nuget #9

Merged
merged 2 commits into from
Sep 27, 2022

Conversation

kzu
Copy link
Member

@kzu kzu commented Sep 27, 2022

So, turns out that nuget is completely broken for transitive assets that aren't specifically buildTransitive assets. Why that scenario was fixed just for that ultra-narrow use case of build assets is anyone's guess.

So, we leverage that one-and-only working transitive scenario to detect the situation where transitive assets are missing (the Compile files we provide as content) and include the missing files ourselves.

This requires changing the way we allow opt-out of the service attribute type, though, since now there is no package reference to set the Exclude on. For that, we provide a new property IncludeServiceAttribute that we use to remove the automatically added contentFiles (in non-transitive) or skip adding ourselves (in transitive).

Fixes #8

So, turns out that nuget is completely broken for transitive assets that
aren't specifically `buildTransitive` assets. Why that scenario was fixed
just for that ultra-narrow use case of build assets is anyone's guess.

So, we leverage that one-and-only working transitive scenario to detect
the situation where transitive assets are missing (the Compile files we
provide as content) and include the missing files ourselves.

This requires changing the way we allow opt-out of the service attribute
type, though, since now there is no package reference to set the Exclude
on. For that, we provide a new property IncludeServiceAttribute that we
use to remove the automatically added contentFiles (in non-transitive)
or skip adding ourselves (in transitive).

Fixes #8
@kzu kzu merged commit 9eb2464 into main Sep 27, 2022
@kzu kzu deleted the dev/transitive branch September 27, 2022 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix transitive contentFiles support that's missing in nuget
1 participant