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.
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