Theraot
Theraot copied to clipboard
System.ValueTuple conflict
warning MSB3268: The primary reference "Quartz.dll" could not be resolved because it has an indirect dependency on the framework assembly "System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "Quartz.dll" or retarget your application to a framework version which contains "System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51".
due to dependency on System.ValueTuple 4.3.0 in Theraot.Core (3.2.11)
if I add System.ValueTuple 4.5.0 nuget package to the project this error goes away
I do not see 4.0.1.0 version in NuGet
https://www.nuget.org/packages/System.ValueTuple/
Probably it is unlisted and can be used.
Looks like System.ValueTuple conflicts with itself if I only have Theraot.Core (which have System.ValueTuple 4.3.0) it compiles cleanly In another project where I have Vanara.Core, which have dependency on both System.ValueTuple 4.5.0 and Theraot.Core this error appears
Repro.zip
Here is reproduction
To compile remove one of dependencies in ClassLibrary1
even nastier
it can't build anything that have transitive dependency on Vanara.Core
ClassLibrary succeeds, ConsoleApp fails.
Probably you just need to update System.ValueTuple 4.3.0 to 4.5.0 in Theraot.Core to resolve this
And if I set <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
it can't even build ClassLibrary.
Probably you just need to update System.ValueTuple 4.3.0 to 4.5.0 in Theraot.Core to resolve this
Or downgrade to 4.0.1.0 Therapy should use the lowest versions possible in order to minimize number of such conflicts.
"System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" is assembly for netstandart (strange version number and it has the same PublicKeyToken) See 4.3.0 vs 4.5.0 (Framework tab) I think this is somehow related to https://github.com/dotnet/corefx/pull/42849
It could be possible to downgrade the required package version in Vanara. However the support for .NET 4.0 has been removed. If this is important to you to have .NET 4.0 supported, please open an issue.
@OwnageIsMagic The fix is merged into Vanara library. You just need to build a version for you with .NET 4.0 target.
@NN--- now I have 2 libs with ValueTuple 4.3.0 and 5 with 4.5.0 in my dependency graph nice job xD
Seems like you have inevitable conflict. You can ask authors of other packages to lower version if this is possible at all. It can happen with any package. NuGet is not able to handle multiple versions :)
Simply add System.ValueTuple 4.5.0 package reference to your project.
Simply add System.ValueTuple 4.5.0 package reference to your project.
this doesn't work