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

System.Memory is not referenced in the built nuspec despite being referenced in the Assembled dll #1303

Closed
BryanAldrich opened this issue Apr 18, 2024 · 1 comment
Assignees
Labels

Comments

@BryanAldrich
Copy link

Bug description

The nuspec file in the nuget package is missing the System.Memory dependancy for .net framework 4.7.2 This is causing the package dependency graph for nuget to fail if system.memory isn't manually installed and bumped up to 4.5.5 from what otherwise would be 4.5.4

.NETFramework 4.7.2
Microsoft.Bcl.AsyncInterfaces (>= 7.0.0)
Microsoft.VisualStudio.Threading.Analyzers (>= 17.9.28)
Microsoft.VisualStudio.Validation (>= 17.8.8)
Microsoft.Win32.Registry (>= 5.0.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
System.Threading.Tasks.Extensions (>= 4.5.4)
.NETStandard 2.0
Microsoft.Bcl.AsyncInterfaces (>= 7.0.0)
Microsoft.VisualStudio.Threading.Analyzers (>= 17.9.28)
Microsoft.VisualStudio.Validation (>= 17.8.8)
Microsoft.Win32.Registry (>= 5.0.0)
System.Memory (>= 4.5.5)
System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
System.Threading.Tasks.Extensions (>= 4.5.4)

Repro steps

See attached.
NugetReferenceTest.zip
The issue isn't caused by Nito, just happened to be the other package in my scenario. It appears to actually be caused by the System.Collections.Immutable reference.

Expected behavior

Nuget package graph to include 4.5.5 for System.Memory

Actual behavior

Big warning.
Found conflicts between different versions of "System.Memory" that could not be resolved. There was a conflict between "System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" and "System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51". "System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" was chosen because it was primary and "System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" was not. References which depend on "System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" [C:\Users\baldrich\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll]. C:\Users\baldrich\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll Project file item includes which caused reference "C:\Users\baldrich\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll". C:\Users\baldrich\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll References which depend on or have been unified to "System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" [C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\PublicAssemblies\System.Memory.dll]. C:\Users\baldrich\.nuget\packages\microsoft.visualstudio.threading\17.9.28\lib\net472\Microsoft.VisualStudio.Threading.dll Project file item includes which caused reference "C:\Users\baldrich\.nuget\packages\microsoft.visualstudio.threading\17.9.28\lib\net472\Microsoft.VisualStudio.Threading.dll". C:\Users\baldrich\.nuget\packages\microsoft.visualstudio.threading\17.9.28\lib\net472\Microsoft.VisualStudio.Threading.dll C:\Users\baldrich\.nuget\packages\system.collections.immutable\1.7.1\lib\net461\System.Collections.Immutable.dll Project file item includes which caused reference "C:\Users\baldrich\.nuget\packages\system.collections.immutable\1.7.1\lib\net461\System.Collections.Immutable.dll". C:\Users\baldrich\.nuget\packages\system.collections.immutable\1.7.1\lib\net461\System.Collections.Immutable.dll C:\Users\baldrich\.nuget\packages\nito.disposables\2.2.1\lib\net461\Nito.Disposables.dll C:\Users\baldrich\.nuget\packages\nito.asyncex.coordination\5.1.2\lib\net461\Nito.AsyncEx.Coordination.dll C:\Users\baldrich\.nuget\packages\nito.asyncex.tasks\5.1.2\lib\net461\Nito.AsyncEx.Tasks.dll

  • Version used:
  • Application (if applicable):

Additional context

Add any other context about the problem here.

@AArnott AArnott self-assigned this May 17, 2024
@AArnott
Copy link
Member

AArnott commented May 17, 2024

Thank you for reporting this.
This appears to be due to microsoft/CsWin32#1158, which was recently fixed, and should be applied to this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants