Replies: 1 comment 1 reply
-
Is it related to NuGet/Home#10368 ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have found out today that i cannot make use of multi-targeting if any of the underlying dependencies have a
PackageId
Property Declared (Along with a version).For instance, let's say i have 2 projects, which only differ by the target framework & package version :
Now let's say i have a library that support multi-targeting like such :
If i now try to build an app using this Library in an app targeting
net5.0
then i get this error on compilation :if i look inside inside project.assets.json in the obj folder, then i can see this :
For some reasons, Something in the restore process cause something to set the dependency in both target to the latest version of Some.Dependency, instead of the one specified in the condition.
Here is the repo used : https://github.com/Mrcubix/Multi-Targeting-Issue
Any ideas on how i could fix such an issue?
The current workaround i have right now is to create a separate folder for the .NET 6 target and include the source from the other Lib.
Also this obviously seems to be a bug, wondering if i should address that in the nuget repo, the sdk or here.
Beta Was this translation helpful? Give feedback.
All reactions