-
Notifications
You must be signed in to change notification settings - Fork 931
Description
With version 5.6.0 there is a package resolve issue when building for .net 9 and a runtime identifier win-x64. This is due to a bug in NETStandard.Library 1.6.0.
dotnet build MyProject.csproj -r win-x64
Warning As Error: Detected package downgrade: Microsoft.Win32.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.
MyProject -> NHibernate 5.6.0 -> Antlr3.Runtime 3.5.1 -> NETStandard.Library 1.6.0 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> Microsoft.Win32.Primitives (>= 4.3.0)
MyProject -> NHibernate 5.6.0 -> Antlr3.Runtime 3.5.1 -> NETStandard.Library 1.6.0 -> Microsoft.Win32.Primitives (>= 4.0.1)
When using NHibernate 5.5.3 this issue does not appear since instead of NETStandard.Library 1.6.0 it resolves to NETStandard.Library 1.6.1 which doesn't have this bug.
And the reason why NETStandard.Library is downgraded from 1.6.1 to 1.6.0 when updating NHibernate from 5.5.3 to 5.6.0 is the updated Iesi.Collections.
5.5.3 was using Iesi.Collections 4.0.4 where the used dependency was .NETStandard 1.3 and therefore NETStandard.Library 1.6.0.
5.6.0 is now using Iesi.Collections 4.1.1 where the used dependency is .net8.0 which has no dependency to NETStandard.Library which results in the use of NETStandard.Library 1.6.0 referenced by Antlr3.Runtime 3.5.1
The workaround for now is to include NETStandard.Library 1.6.1 in my project, but I believe this should be fixed within NHibernate.