Skip to content

Single Project #17844

Answered by maxkatz6
marcosgerene asked this question in Q&A
Dec 29, 2024 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

For implementation details you can see this PR #9613

To enable this, you need to add <AvaloniaSingleProject>true</AvaloniaSingleProject> to your project, add all necessary target frameworks (that are supported by the .NET SDK at least) and then enable package references conditionally:

<PackageReference Include="Avalonia.iOS" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'" />
<PackageReference Include="Avalonia.Android" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'" />
<PackageReference Include="Avalonia.Browser" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'browser'" />
<!-- Pla…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@thevortexcloud
Comment options

@maxkatz6
Comment options

@maxkatz6
Comment options

Answer selected by marcosgerene
@MikeCodesDotNET
Comment options

@marcosgerene
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
4 participants