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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
XamarinApplicationproject targetingnet5.0(it says "without having to multi-target her entire application") and aXamarinGpslibrary targetingnet5.0-ios;net5.0-android;net5.0-windows;net5.0of which the implementation is outlined in the example.The problem is that since
XamarinApplicationis not using multitargeting and targets justnet5.0, the version ofXamarinGpsthat will be used is thenet5.0one, and that version has no implementation (justthrow new PlatformNotSupportedException()).Unless I misunderstand something, it will not work unless
XamarinApplicationalso 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