Fody sucks :)

This commit is contained in:
Alex
2025-06-06 17:44:10 +01:00
parent 85014c1ec5
commit be7e0aea2d
15 changed files with 195 additions and 41 deletions
@@ -22,17 +22,6 @@
<ItemGroup>
<PackageReference Include="System.IO.Hashing" Version="9.0.5"/>
<PackageReference Include="FastCloner" Version="3.3.4"/>
<!--
We are using Fody to make all methods virtual, this is a perfect use case for us to allow modders to override
any behaviour they need and replace any classes.
-->
<PackageReference Include="Fody" Version="6.9.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Virtuosity.Fody" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
@@ -48,6 +37,10 @@
<!-- BuildType options - LOCAL, DEBUG, RELEASE, BLEEDING_EDGE, BLEEDING_EDGE_MODS - *must be all caps*-->
</PropertyGroup>
<Target Name="AfterEverythingDone" AfterTargets="PostBuildEvent">
<Exec ConsoleToMsBuild="true" Command="..\..\Ceciler\Ceciler.Launcher.exe $(OutDir)SPTarkov.Server.Core.dll ..\..\Patches\Ceciler.Virtualizer\bin\$(Configuration)\$(TargetFramework)\Ceciler.Virtualizer.dll"/>
</Target>
<!-- Generates the ProgramStatics class with the build information -->
<Target Name="GenerateProgramStatics" BeforeTargets="BeforeBuild">
<WriteLinesToFile File="Utils/ProgramStatics.Generated.cs" Lines="&#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 = &quot;$(SptVersion)&quot;%3B&#xD;&#xA; private static string? _commit = &quot;$(SptCommit)&quot;%3B&#xD;&#xA; private static double? _buildTime = $(SptBuildTime)%3B&#xD;&#xA; private static EntryType? BuildType = EntryType.$(SptBuildType)%3B&#xD;&#xA;}&#xD;&#xA;" Overwrite="true"/>