Created
March 24, 2025 04:00
-
-
Save joe-oli/3ac8048e8c443fca71c9296718c406b8 to your computer and use it in GitHub Desktop.
Sample Project file ProjName.csproj for .NET MAUI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
The template in VS ".NET MAUI App" creates by default other platforms e.g. maui-android, maui-ios, maui-catalyst, maui-tizen, etc; | |
It's just not worth it, as it does NOT build by default; At least not when I tried it! | |
Better remove all the other platforms if you only want Windows; Below is the modified project file to target only Windows; | |
Delete the other folders under "Platforms" | |
--> | |
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFrameworks>net8.0-windows10.0.19041.0</TargetFrameworks> | |
<OutputType>Exe</OutputType> | |
<RootNamespace>ProcessorMauiApp</RootNamespace> | |
<UseMaui>true</UseMaui> | |
<SingleProject>true</SingleProject> | |
<ImplicitUsings>enable</ImplicitUsings> | |
<Nullable>enable</Nullable> | |
<!-- Display name --> | |
<ApplicationTitle>ProcessorMauiApp</ApplicationTitle> | |
<!-- App Identifier --> | |
<ApplicationId>com.companyname.processormauiapp</ApplicationId> | |
<!-- Versions --> | |
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion> | |
<ApplicationVersion>1</ApplicationVersion> | |
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion> | |
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion> | |
</PropertyGroup> | |
<ItemGroup> | |
<!-- App Icon --> | |
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" /> | |
<!-- Splash Screen --> | |
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" /> | |
<!-- Images --> | |
<MauiImage Include="Resources\Images\*" /> | |
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" /> | |
<!-- Custom Fonts --> | |
<MauiFont Include="Resources\Fonts\*" /> | |
<!-- Raw Assets (also remove the "Resources\Raw" prefix) --> | |
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> | |
</ItemGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" /> | |
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" /> | |
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" /> | |
</ItemGroup> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment