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

Drop the implicit System.Memory reference from the package #1172

Merged
merged 2 commits into from
May 4, 2024
Merged

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented May 3, 2024

Because we advise users to set PrivateAssets=all on the CsWin32 package itself, its transitive dependencies don't pass through to the CsWin32 user's own consumers, leading to compilation or binding redirect issues because System.Memory is missing.
By dropping it from the package itself and requiring CsWin32 users to reference it directly, we put a bit more responsibility on them but solve the problem of the missing reference.

To help users get this right, we report a new warning when System.Memory hasn't been referenced.

Fixes #1158

Because we advise users to set `PrivateAssets=all` on the CsWin32 package itself, its transitive dependencies don't pass through to the CsWin32 user's own consumers, leading to compilation or binding redirect issues because System.Memory is missing.
By dropping it from the package itself and requiring CsWin32 users to reference it directly, we put a bit more responsibility on them but solve the problem of the missing reference.

To help users get this right, we report a new warning when System.Memory hasn't been referenced.

Fixes #1158
@AArnott AArnott force-pushed the fix1158 branch 2 times, most recently from dc413ad to 6d6fc60 Compare May 3, 2024 23:27
@AArnott AArnott merged commit 9b7a024 into main May 4, 2024
2 checks passed
@AArnott AArnott deleted the fix1158 branch May 4, 2024 00:47
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.

IncludeAssets=all advice causes problems with NuGet packages
1 participant