Repository navigation
Expand file tree
/
Copy pathKeyClassify.csproj
More file actions
76 lines (68 loc) · 4.72 KB
/
Copy pathKeyClassify.csproj
File metadata and controls
76 lines (68 loc) · 4.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>KeyClassify</RootNamespace>
<AssemblyName>KeyClassify</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Library</OutputType>
<Version>1.0.1</Version>
<OutputPath>bin\$(Configuration)\$(ProjectName)\$(AssemblyName)\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<!-- A library does not serve static assets; this keeps staticwebassets.*.json out of the mod folder -->
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
</PropertyGroup>
<!--
Compile against the *lowest* SPT version we support, not the one installed on this machine.
The mod DLL records the assembly version it was compiled against (SPTarkov.Server.Core, Version=x.y.z.0).
.NET rolls that reference forward to newer assemblies but never back, so a DLL built against 4.1.6 refuses
to load on 4.1.5 ("Could not load file or assembly 'SPTarkov.Server.Core, Version=4.1.6.0'"). Building
against 4.1.0 makes the same DLL load on every 4.1.x server; SPT's mod loader then only checks that the
referenced version is not newer than the running server.
SPT publishes these assemblies on NuGet up to 4.1.2, so no local installation is needed to build.
Bump these three versions together if you deliberately drop older servers.
-->
<PropertyGroup>
<MinSptVersion>4.1.0</MinSptVersion>
<!-- Only used by the DebugCopy/StagingForge targets below, not by the compiler -->
<SptServerDir Condition="'$(SptServerDir)' == ''">E:\GAME\SPT_Runtime</SptServerDir>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SPTarkov.Server.Core" Version="$(MinSptVersion)" ExcludeAssets="runtime" PrivateAssets="all" />
<PackageReference Include="SPTarkov.Common" Version="$(MinSptVersion)" ExcludeAssets="runtime" PrivateAssets="all" />
<PackageReference Include="SPTarkov.DI" Version="$(MinSptVersion)" ExcludeAssets="runtime" PrivateAssets="all" />
<PackageReference Include="SemanticVersioning" Version="3.0.0" ExcludeAssets="runtime" PrivateAssets="all" />
</ItemGroup>
<!-- Keep the mod folder next to the server in sync for quick iteration -->
<!-- -p:SkipModCopy=true builds without touching the server folder (handy on machines where that path is read-only) -->
<Target Name="DebugCopy" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug' and '$(SkipModCopy)' != 'true'">
<PropertyGroup>
<DebugStaging>$(SptServerDir)\user\mods\$(ProjectName)</DebugStaging>
</PropertyGroup>
<MakeDir Directories="$(DebugStaging)" />
<ItemGroup>
<DebugDlls Include="$(OutputPath)*.dll" />
<DebugPdb Include="$(OutputPath)*.pdb" />
<ConfigFolder Include="$(OutputPath)config\**\*.*" />
</ItemGroup>
<Message Importance="high" Text="Copying debug build to $(DebugStaging)" />
<Copy SourceFiles="@(DebugDlls)" DestinationFolder="$(DebugStaging)" SkipUnchangedFiles="false" />
<Copy SourceFiles="@(DebugPdb)" DestinationFolder="$(DebugStaging)" SkipUnchangedFiles="false" Condition="Exists('$(OutputPath)$(AssemblyName).pdb')" />
<Copy SourceFiles="@(ConfigFolder)" DestinationFiles="@(ConfigFolder->'$(DebugStaging)\config\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
<!-- Release output is staged into artifacts/ so it can be zipped for distribution -->
<Target Name="StagingForge" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
<PropertyGroup>
<StagingDir Condition="'$(StagingDir)' == ''">$(MSBuildThisFileDirectory)artifacts\$(ProjectName)\SPT\user\mods\$(ProjectName)</StagingDir>
</PropertyGroup>
<MakeDir Directories="$(StagingDir)" Condition="!Exists('$(StagingDir)')" />
<ItemGroup>
<DllFiles Include="$(OutputPath)*.dll" />
<ConfigFolder Include="$(OutputPath)config\**\*.*" />
</ItemGroup>
<Message Importance="high" Text="Copying release build to $(StagingDir)" />
<Copy SourceFiles="@(DllFiles)" DestinationFolder="$(StagingDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(ConfigFolder)" DestinationFiles="@(ConfigFolder->'$(StagingDir)\config\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)README.md" DestinationFolder="$(StagingDir)" SkipUnchangedFiles="true" Condition="Exists('$(MSBuildThisFileDirectory)README.md')" />
</Target>
</Project>