Replies: 1 comment
-
Yes I think you're right, the main application would need to multi-target as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There seems to be a confusing example (potentially wrong?) in the document about Target Framework Names in .NET 5. This is the example about using TFMs to vary implementation.
It says:
So I imagine there is a
XamarinApplication
project targetingnet5.0
(it says "without having to multi-target her entire application") and aXamarinGps
library targetingnet5.0-ios;net5.0-android;net5.0-windows;net5.0
of which the implementation is outlined in the example.The problem is that since
XamarinApplication
is not using multitargeting and targets justnet5.0
, the version ofXamarinGps
that will be used is thenet5.0
one, and that version has no implementation (justthrow new PlatformNotSupportedException()
).Unless I misunderstand something, it will not work unless
XamarinApplication
also targetsnet5.0-ios;net5.0-android;net5.0-windows
(in which case the platform specific implementations will be used).If Ida wants to avoid multitargeting in
XamarinApplication
, it sounds like she should be using runtime identifiers, not TFMs.Am I missing something or is the example misleading?
cc: @terrajobst since he's the author.
Beta Was this translation helpful? Give feedback.
All reactions