Update to CoreCompile & Include file for compiliation

This commit is contained in:
Archangel
2025-08-05 22:04:34 +02:00
parent e86949c361
commit 237a829e5d
2 changed files with 5 additions and 16 deletions
@@ -48,11 +48,15 @@
/>
</Target>
<!-- Generates the ProgramStatics class with the build information -->
<Target Name="GenerateProgramStatics" BeforeTargets="BeforeBuild">
<Target Name="GenerateProgramStatics" BeforeTargets="CoreCompile">
<WriteLinesToFile
File="Utils/ProgramStatics.Generated.cs"
Lines="// &lt;auto-generated /&gt;&#xD;&#xA;// This file is automatically generated. Do not modify manually.&#xD;&#xA;// Any changes made to this file will be overwritten during the build process.&#xD;&#xA;&#xD;&#xA;using SPTarkov.Server.Core.Models.Enums%3B&#xD;&#xA;&#xD;&#xA;namespace SPTarkov.Server.Core.Utils%3B&#xD;&#xA;&#xD;&#xA;public static partial class ProgramStatics&#xD;&#xA;{&#xD;&#xA; private static string SptVersion { get%3B } = &quot;$(SptVersion)&quot;%3B&#xD;&#xA; private static string Commit { get%3B } = &quot;$(SptCommit)&quot;%3B&#xD;&#xA; private static double BuildTime { get%3B } = $(SptBuildTime)%3B&#xD;&#xA; private static EntryType BuildType { get%3B } = EntryType.$(SptBuildType)%3B&#xD;&#xA;}&#xD;&#xA;"
Overwrite="true"
/>
</Target>
<!-- This is necessary to force MSBuild to look for this file after CoreCompile generated it-->
<ItemGroup>
<Compile Include="Utils/ProgramStatics.Generated.cs" />
</ItemGroup>
</Project>
@@ -1,15 +0,0 @@
// <auto-generated />
// This file is automatically generated. Do not modify manually.
// Any changes made to this file will be overwritten during the build process.
using SPTarkov.Server.Core.Models.Enums;
namespace SPTarkov.Server.Core.Utils;
public static partial class ProgramStatics
{
private static string SptVersion { get; } = "4.0.0";
private static string Commit { get; } = "a12b34";
private static double BuildTime { get; } = 0000000000;
private static EntryType BuildType { get; } = EntryType.LOCAL;
}