nodatime / nodatime

A better date and time API for .NET

Home Page:https://nodatime.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update System.Runtime.CompilerServices.Unsafe to version 6+

SonofNun15 opened this issue · comments

Because NuGet only resolves one version of each dependency, NodaTime is making it complicated to update other dependencies that rely on System.Runtime.CompilerServices.Unsafe and want version 6+. Would be useful if NodaTime moved to this version as well. Thanks!

I'll have a look when I get a chance, but I'd expect you to be able to just depend on a later version and nuget will resolve to the most recent. Can you give a sample project file and what errors it's causing?

We're referencing Microsoft.Extensions.Http version 6.0.0, which needs System.Runtime.CompilerServices.Unsafe >=6.0.0. As you said, I think NuGet should be able to deal with this, but it's just unhappy because of the version discrepancies.

What happens if you just add a dependency to System.Runtime.CompilerServices.Unsafe version 6 on your project?

We'll be fine. Had to explicitly add <WarningsAsErrors /> to our project files to get Visual Studio to stop displaying these warnings as errors. I may look into your suggestion about explicitly adding that reference just to limit the warnings.