Share via

what is the means of None Remove in .net maui?

mc 6,801 Reputation points
2026-02-26T12:17:02.99+00:00

User's image

what is the means of it? remove the resources?

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

Answer accepted by question author
  1. Marcin Policht 81,790 Reputation points MVP Volunteer Moderator
    2026-02-26T12:22:50.87+00:00

    In .NET MAUI, <None Remove="Resource..." /> is an MSBuild project file instruction used inside a .csproj file. It tells the build system to remove specific files from the None item group.

    In MSBuild, None represents files that are included in the project but are not compiled or processed in a special way. They are typically copied as-is or simply tracked by the project. When you use <None Remove="SomeFileOrPattern" />, you are explicitly removing matching files from that default None classification.

    This is commonly used when a file would otherwise be automatically included as None, but you want to reclassify it as something else, such as MauiImage, MauiFont, Content, EmbeddedResource, etc. For example:

    <ItemGroup>
      <None Remove="Resources\Images\logo.png" />
      <MauiImage Include="Resources\Images\logo.png" />
    </ItemGroup>
    

    In this case, the image is first removed from the default None group and then added as a MauiImage, so MAUI can process it correctly for different platforms.

    So in short, <None Remove="..."> does not delete a file from disk. It only removes the file from the None build item group inside the project configuration so it can be excluded or redefined for the build process.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.