Add the JSON code generation needed to make my code fully trimmable, and therefore able to be published with full native AOT compilation. NOTE: This may not guarantee stable builds as the logging library serilog is still not fully trimmable, I have made changes to my logging statements to avoid destructuring, but there is a chance that a published build could randomly crash. The only solution is to either wait for serilog to become fully trimmable, or to remove the logging from AOT builds
45 lines
1.7 KiB
XML
45 lines
1.7 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<OutputType>Exe</OutputType>
|
|
|
|
<Version Condition="'$(RELEASE_VERSION)' != ''">$(RELEASE_VERSION)</Version>
|
|
<VersionPrefix Condition="'$(RELEASE_VERSION)' == ''">0.0.2</VersionPrefix>
|
|
<VersionSuffix Condition="'$(RELEASE_VERSION)' == ''">$([System.DateTime]::UtcNow.ToString(`yyyyMMdd-HHmm`))</VersionSuffix>
|
|
|
|
|
|
<OutputPath>bin\$(Configuration)\</OutputPath>
|
|
|
|
<TargetFramework>net8.0</TargetFramework>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Serilog" Version="4.0.0" />
|
|
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
|
|
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
|
<PackageReference Include="spectre.console" Version="0.49.1" />
|
|
<PackageReference Include="system.commandline" Version="2.0.0-beta4.22272.1" />
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
|
<!-- Here we define the Debug Build.
|
|
-->
|
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
|
<!-- Here we define the release build.
|
|
The Release Build will be a Single file App
|
|
The Release Build will also do -Werror as I don't want to release shitty code
|
|
The Release Build will also be R2R as I don't want it to depend on the framework
|
|
NOTE: This build requires specifying a platform
|
|
-->
|
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
<PublishAOT>true</PublishAOT>
|
|
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
|
|
<TrimmerSingleWarn>false</TrimmerSingleWarn>
|
|
</PropertyGroup>
|
|
</Project>
|