The old `<Exec Command="COPY ...">` PostBuild step only worked on Windows, blocking CI on ubuntu-latest. Replaced with two MSBuild `<Copy>` targets: one AfterTargets="Build" (preserves the existing build-output behavior), one AfterTargets="Publish" (new — publish output now includes the libs automatically, so downstream release packaging doesn't need a shell copy workaround). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
80 lines
3.4 KiB
XML
80 lines
3.4 KiB
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net8.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
<!-- See SVSim.BattleNode.csproj — same NU1903 audit suppression so MSBuildWorkspace
|
|
loads this project cleanly during ClosureAnalyzer runs. -->
|
|
<NoWarn>$(NoWarn);NU1903</NoWarn>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Facepunch.Steamworks" Version="2.3.3" />
|
|
<PackageReference Include="MessagePack" Version="2.5.172" />
|
|
<PackageReference Include="MessagePackAnalyzer" Version="2.5.172">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.4" />
|
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<InternalsVisibleTo Include="SVSim.UnitTests" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<!-- The host exe runs EngineGlobalInit, which reads Data/cards.json from its OWN output dir.
|
|
CopyToOutput content does NOT flow across a ProjectReference, so the host needs its own copy. -->
|
|
<None Include="..\SVSim.Bootstrap\Data\cards.json" Link="Data\cards.json" CopyToOutputDirectory="PreserveNewest" />
|
|
<None Include="Data\card_master_2026-06-03.txt" CopyToOutputDirectory="PreserveNewest" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\SVSim.Database\SVSim.Database.csproj" />
|
|
<ProjectReference Include="..\SVSim.BattleNode\SVSim.BattleNode.csproj" />
|
|
<ProjectReference Include="..\SVSim.Hosting\SVSim.Hosting.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<None Update="lib\libsteam_api.so">
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="lib\libsteam_api.so.meta">
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="lib\steam_api.dll">
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="lib\steam_api.lib">
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="lib\steam_api64.dll">
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="lib\steam_api64.lib">
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
|
|
<!-- Copy the Steamworks native libs into the build AND publish output. Was previously
|
|
an `<Exec Command="COPY ...">` that only ran on Windows; the MSBuild `<Copy>` task
|
|
is cross-platform, so CI can build on ubuntu-latest without a shell fallback. -->
|
|
<ItemGroup>
|
|
<SteamworksNativeLibs Include="$(ProjectDir)lib\**\*" />
|
|
</ItemGroup>
|
|
<Target Name="CopySteamworksLibsToOutput" AfterTargets="Build">
|
|
<Copy SourceFiles="@(SteamworksNativeLibs)" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" />
|
|
</Target>
|
|
<Target Name="CopySteamworksLibsToPublish" AfterTargets="Publish">
|
|
<Copy SourceFiles="@(SteamworksNativeLibs)" DestinationFolder="$(PublishDir)" SkipUnchangedFiles="true" />
|
|
</Target>
|
|
|
|
</Project>
|