Skip to content

How to use WinRT in Avalonia? #15799

Discussion options

You must be logged in to vote

You can use Xamarin essentials for that. It already implements the share dialogue for most platforms.

https://learn.microsoft.com/en-us/previous-versions/xamarin/essentials/share?tabs=uwp

With that said, that is not the way you multi target. Instead you do:

<TargetFrameworks>net6.0-windows10.0.19041.0;net6.0</TargetFrameworks>

When you build the project, it will output assemblies for both targets. The problem with multi targeting (at least with platform specific TFMs) is that you can't have any reference to a platform specific API in your shared code. If you do, every project but the build output for the platform that implements the API will fail. So to get around that you have to use pre…

Replies: 3 comments 20 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@DmitryBorodiy
Comment options

@DmitryBorodiy
Comment options

@J0nathan550
Comment options

@thevortexcloud
Comment options

Answer selected by DmitryBorodiy
@DmitryBorodiy
Comment options

@DmitryBorodiy
Comment options

@thevortexcloud
Comment options

@thevortexcloud
Comment options

Comment options

You must be logged in to vote
10 replies
@jp2masa
Comment options

@thevortexcloud
Comment options

@jp2masa
Comment options

@maxkatz6
Comment options

@DmitryBorodiy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants