feat(proj): move files on build and SPT.Server launch

This commit is contained in:
Yui
2025-11-05 16:18:02 -03:00
parent 2267e1078e
commit 95c864b3c5
3 changed files with 34 additions and 1 deletions

View File

@@ -9,7 +9,24 @@
<AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')" />
</ItemGroup>
<PropertyGroup>
<ModsDirectoryPath>$(SPTPath)user/mods/$(MSBuildProjectName)</ModsDirectoryPath>
</PropertyGroup>
<Target Name="CopyToSPT" AfterTargets="AfterBuild" Condition="'$(SPTPath)' != ''">
<Message Importance="high" Text="Copying mods to $(ModsDirectoryPath)" />
<ItemGroup>
<FilesToCopy Include="$(OutputPath)$(TargetName)$(TargetExt)" />
<FilesToCopy Include="$(OutputPath)$(TargetName).pdb" />
</ItemGroup>
<Copy SourceFiles="@(FilesToCopy)" DestinationFolder="$(ModsDirectoryPath)" ContinueOnError="false" />
<Message Text="Files copied" />
</Target>
<ItemGroup>
<PackageReference Include="SPTarkov.Server.Core" Version="4.0.3" />
</ItemGroup>
@@ -17,6 +34,7 @@
<Content Include="bundles\**">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Server.csproj.user" />
</ItemGroup>
<ItemGroup>
<Content Include="bundles.json">