Skip to content

How to Exclude Specific <Page> Items from WASM Build using Uno.Sdk Single Project? #18866

Answered by jeromelaban
AdriaanLarcai asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the question!

Given the structure of files inclusion in the Uno.SDK, the only way to remove files is to remove the files in a target, like this:

<Target Name="AdjustAppItemGroups" BeforeTargets="ResolveAssemblyReferences">
    <ItemGroup Condition="'$(TargetFramework)' == 'net9.0-browserwasm'">
        <None Remove="Page.xaml"/>
        <Page Remove="Page.xaml"/>
    </ItemGroup>
</Target>

This target is executed as part of Design-Time builds and should be applied at the right times.

Give it a try and let us know!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MartinZikmund
Comment options

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