當前文章的短網址連結為: https://unos.top/5xqq
打开项目配置文件: xxx.csproj, 添加一行代码即可
<PropertyGroup>
<OutputType>Exe</OutputType>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!--指定要使用的MAUI版本-->
<MauiVersion>8.0.40</MauiVersion>
</PropertyGroup>