1.升級VS
vs2022社區版本 17.5.3 後可用
2.vs安裝C++
3.添加aot配置
<PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net7.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <!--添加aot--> <PublishAot>true</PublishAot> </PropertyGroup>
4.
發佈時的配置