-
Notifications
You must be signed in to change notification settings - Fork 7
/
Directory.Build.targets
72 lines (63 loc) · 2.37 KB
/
Directory.Build.targets
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
<Project>
<Import Project="$(SolutionDir)\build\InfoProps.targets" />
<!-- Load 'global' ContentLib.props.user file if it exists -->
<Import Project="$(SolutionDir)\ContentLib.props.user" Condition="Exists('$(SolutionDir)\ContentLib.props.user')" />
<Target Name="CopyToUserPluginsDir" AfterTargets="PostBuildEvent" Condition="$(UserPluginsDir) != ''">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(UserPluginsDir)ContentLib/" />
</Target>
<Target Name="WarnAboutMissingUserFile" AfterTargets="PostBuildEvent" Condition="$(UserPluginsDir) == '' And $(CI) != 'true'">
<Message Importance="High" Text="UserPluginsDir from ContentLib.props.user isn't defined! It's highly recommended to copy the ContentLib.props.user.template file and remove the '.template' extension and fill it with valid values." />
</Target>
<!-- Copy MMHOOK assemblies to repo for GitHub actions -->
<Target Name="CopyMMHOOKAssemblies" AfterTargets="PreBuildEvent" Condition="$(UserPluginsDir) != ''">
<ItemGroup>
<MMHOOKAssembliesFromPlugins Include="$(UserPluginsDir)MMHOOK/**/MMHOOK_Assembly-CSharp.dll" />
</ItemGroup>
<Copy SourceFiles="@(MMHOOKAssembliesFromPlugins)" DestinationFolder="$(SolutionDir)/lib" SkipUnchangedFiles="true" />
</Target>
<!-- References -->
<ItemGroup>
<PackageReference
Include="BepInEx.Analyzers"
PrivateAssets="all"
Version="1.*"
/>
<PackageReference
Include="BepInEx.Core"
Version="5.4.*"
/>
<PackageReference
Include="LethalCompany.GameLibs.Steam"
Version="56.0.1-ngd.0"
/>
<PackageReference
Include="UnityEngine.Modules"
IncludeAssets="compile"
Version="2023.2.4"
/>
<Reference
Include="$(SolutionDir)/lib/MMHOOK_Assembly-CSharp.dll"
Private="false"
/>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<PackageReference
Include="Microsoft.NETFramework.ReferenceAssemblies"
PrivateAssets="all"
Version="1.0.2"
/>
</ItemGroup>
<ItemGroup>
<!--
Give us Nullable attributes missing from .NET Standard 2.1:
- MemberNotNullAttribute
- MemberNotNullWhenAttribute
https://github.com/manuelroemer/Nullable
-->
<PackageReference
Include="Nullable"
Version="1.3.1"
PrivateAssets="all"
/>
</ItemGroup>
</Project>