-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
61 lines (55 loc) · 2.47 KB
/
Directory.Build.targets
File metadata and controls
61 lines (55 loc) · 2.47 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
<Project>
<!--
This is a special file that contains shared configuration
for all project files in subdirectories.
-->
<!-- Set extra NuGet sources -->
<PropertyGroup>
<RestoreAdditionalProjectSources>
https://nuget.bepinex.dev/v3/index.json;
https://nuget.windows10ce.com/nuget/v3/index.json
</RestoreAdditionalProjectSources>
</PropertyGroup>
<!-- Modding dependencies -->
<ItemGroup>
<PackageReference Include="BepInEx.Core" Version="5.4.21" />
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" />
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.3" PrivateAssets="all" />
<PackageReference Include="Hamunii.BepInEx.AutoPlugin" Version="2.0.*" PrivateAssets="all" />
<PackageReference Include="Mono.Cecil" Version="0.11.5" PrivateAssets="all" />
</ItemGroup>
<!-- NuGet fallback stripped game references -->
<ItemGroup Condition="!Exists('$(ManagedDir)')">
<PackageReference Include="UnityEngine.Modules" Version="6000.0.36" PrivateAssets="all" />
</ItemGroup>
<!-- Local game references -->
<ItemGroup Condition="Exists('$(ManagedDir)')">
<!--
Reference all assemblies except ones that come
with our target framework or would cause conflicts
-->
<LocalReferences
Include="$(ManagedDir)*.dll"
Exclude="$(ManagedDir)Mono*.dll;$(ManagedDir)netstandard.dll;$(ManagedDir)System*.dll;$(ManagedDir)mscorlib.dll"
/>
<Reference Include="@(LocalReferences)" Private="false" />
<!-- Publicize these assemblies so we can access their internal members -->
<Reference Include="$(ManagedDir)Assembly-CSharp.dll" Private="false" Publicize="true" />
</ItemGroup>
<!--
Build Thunderstore package by calling `dotnet build -c Release -target:PackTS -v d` (verbosity detailed).
Publish to Thunderstore by including `-property:PublishTS=true` in the command.
-->
<Target Name="PackTS" DependsOnTargets="Build" Condition="$(ThunderstorePackable) != 'false'">
<Error
Text=" PackTS must be called with Release configuration."
Condition="'$(Configuration)' != 'Release'"
/>
<PropertyGroup>
<BuildArgument Condition="'$(PublishTS)' != 'true'">build</BuildArgument>
<BuildArgument Condition="'$(PublishTS)' == 'true'">publish</BuildArgument>
</PropertyGroup>
<Exec Command="dotnet tool restore" />
<Exec Command="dotnet tcli $(BuildArgument) --package-version $(Version)" />
</Target>
</Project>