This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TrafficReductionRemover.csproj
109 lines (95 loc) · 4.54 KB
/
TrafficReductionRemover.csproj
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<Project Sdk="Microsoft.NET.Sdk">
<!--
Base csproj setup. Change the AssemblyName, RootNamespace and Description to
accurately describe your mod.
Increment the Version property when you release a new version.
-->
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>TrafficReductionRemover</AssemblyName>
<RootNamespace>TrafficReductionRemover</RootNamespace>
<Description>Disables the mechanic that decreases traffic as your city gets larger.</Description>
<Version>0.1.1</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<RestoreAdditionalProjectSources>
https://api.nuget.org/v3/index.json;
https://nuget.bepinex.dev/v3/index.json;
https://nuget.samboy.dev/v3/index.json
</RestoreAdditionalProjectSources>
<!-- Copies references we make to 3rd party library for distributions -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!-- Suppress the version conflict warnings for System.Net.Http and System.IO.Compression -->
<NoWarn>MSB3277</NoWarn>
</PropertyGroup>
<!--
Uncomment this PropertyGroup to let the C# project read DLLs directory from your game directory,
and also allow the build to move the mod DLLs into the plugins directory for you
-->
<PropertyGroup>
<Cities2_Location>C:\Program Files (x86)\Steam\steamapps\common\Cities Skylines II</Cities2_Location>
</PropertyGroup>
<!--
This is all the references to the DLLs directly from your game directory. The Cities2_Location property
above needs to be uncommented for this to work
-->
<ItemGroup>
<Reference Include="$(Cities2_Location)\Cities2_Data\Managed\Colossal.*.dll" Private="False"/>
<Reference Include="$(Cities2_Location)\Cities2_Data\Managed\Game.dll" Private="False"/>
<Reference Include="$(Cities2_Location)\Cities2_Data\Managed\Unity.*.dll" Private="False"/>
</ItemGroup>
<!--
If you want to embed things directly into your mod, instead of shipping multiple files
<ItemGroup>
<EmbeddedResource Include="./resources/my_pretty_embedded_image.jpg" />
</ItemGroup>
-->
<!--
This ItemGroup is used in CI for the game DLLs.
Make sure you have a private `libcs2` repository with the appropriate DLLs for this to work.
DO NOT make the proprietary DLLs for the game public, as the files are owned by PDX/CO.
-->
<ItemGroup>
<Reference Include="libcs2/Colossal.*.dll" Private="False"/>
<Reference Include="libcs2/Game.dll" Private="False"/>
<Reference Include="libcs2/Unity.*.dll" Private="False"/>
</ItemGroup>
<!--
Everything related to BepInEx and Harmony
-->
<ItemGroup>
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.0.0" />
<PackageReference Include="HarmonyX" Version="2.10.2"></PackageReference>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.7" IncludeAssets="compile" />
</ItemGroup>
<!-- Set the default value for BepInExVersion -->
<PropertyGroup>
<BepInExVersion Condition="'$(BepInExVersion)' == ''">5</BepInExVersion>
</PropertyGroup>
<!--
These ItemGroups and PropertyGroups gives you compatibility with both BepInEx 5 and 6.
Mainly for the purposes of being able to distribute your mods on Thunderstore, and
making it easy to upgrade in the future to proper versions.
-->
<ItemGroup Condition="'$(BepInExVersion)' == '6'">
<PackageReference Include="BepInEx.Unity.Mono" Version="6.0.0-be.*" />
</ItemGroup>
<ItemGroup Condition="'$(BepInExVersion)' == '5'">
<PackageReference Include="BepInEx.Core" Version="5.4.21" IncludeAssets="compile"/>
</ItemGroup>
<PropertyGroup Condition="'$(BepInExVersion)' == '6'">
<DefineConstants>$(DefineConstants);BEPINEX_V6</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2"
PrivateAssets="all" />
</ItemGroup>
<!--
This will try to copy the resulting DLLs from builds directly into your game directory,
as long as we're not in CI
-->
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(CI)' != 'true'">
<Exec
Command="if not exist "$(Cities2_Location)\BepInEx\plugins\$(ProjectName)" mkdir "$(Cities2_Location)\BepInEx\plugins\$(ProjectName)"
copy /Y "$(TargetDir)0Harmony.dll" "$(Cities2_Location)\BepInEx\plugins\$(ProjectName)\0Harmony.dll"
copy /Y "$(TargetDir)$(ProjectName).dll" "$(Cities2_Location)\BepInEx\plugins\$(ProjectName)\$(ProjectName).dll"" />
</Target>
</Project>