Skip to content

Instantly share code, notes, and snippets.

@notpeelz
Last active May 12, 2021 13:59
Show Gist options
  • Save notpeelz/43a0744036a72367d15dfd24317c99cb to your computer and use it in GitHub Desktop.
Save notpeelz/43a0744036a72367d15dfd24317c99cb to your computer and use it in GitHub Desktop.
<Project InitialTargets="ValidateGamePath">
<!--
Add a GameFolder.props file to the solution to set your game path:
<Project>
<PropertyGroup>
<GameFolder>C:\Program Files (x86)\Steam\steamapps\common\GTFO</GameFolder>
</PropertyGroup>
</Project>
-->
<Import Project="$(MSBuildThisFileDirectory)/GameFolder.props" Condition="Exists('$(MSBuildThisFileDirectory)/GameFolder.props')" />
<Target Name="ValidateGamePath">
<Error Text="The GameFolder property must be set to the GTFO game folder." Condition="'$(GameFolder)' == '' or !Exists('$(GameFolder)')" />
</Target>
<PropertyGroup>
<BIELibsFolder>$(GameFolder)/BepInEx/core</BIELibsFolder>
<MonoLibsFolder>$(GameFolder)/mono/Managed</MonoLibsFolder>
<UnhollowedLibsFolder>$(GameFolder)/BepInEx/unhollowed</UnhollowedLibsFolder>
</PropertyGroup>
<!-- NuGet dependencies -->
<ItemGroup>
<PackageReference Include="VersionInfoGenerator" Version="2.0.0" PrivateAssets="all" />
<PackageReference Include="MTFO.Core" Version="*" />
</ItemGroup>
<!-- GTFO and BepInEx assemblies -->
<ItemGroup>
<!-- BepInEx libs -->
<Reference Include="$(BIELibsFolder)/BepInEx.*.dll" Private="false" />
<Reference Include="$(BIELibsFolder)/0Harmony.dll" Private="false" />
<Reference Include="$(BIELibsFolder)/UnhollowerBaseLib.dll" Private="false" />
<Reference Include="$(BIELibsFolder)/UnhollowerRuntimeLib.dll" Private="false" />
<!-- System.Text.Json dependencies -->
<Reference Include="$(MonoLibsFolder)/System.Buffers.dll" Private="false" />
<Reference Include="$(MonoLibsFolder)/System.Memory.dll" Private="false" />
<Reference Include="$(MonoLibsFolder)/System.Buffers.dll" Private="false" />
<Reference Include="$(MonoLibsFolder)/System.Numerics.Vectors.dll" Private="false" />
<Reference Include="$(MonoLibsFolder)/Microsoft.Bcl.AsyncInterfaces.dll" Private="false" />
<Reference Include="$(MonoLibsFolder)/System.Runtime.CompilerServices.Unsafe.dll" Private="false" />
<Reference Include="$(MonoLibsFolder)/System.Text.Encodings.Web.dll" Private="false" />
<Reference Include="$(MonoLibsFolder)/System.Threading.Tasks.Extensions.dll" Private="false" />
<!-- System.Text.Json -->
<Reference Include="$(MonoLibsFolder)/System.Text.Json.dll" Private="false" />
<!-- Unhollowed assemblies -->
<Reference Include="$(UnhollowedLibsFolder)/*.dll" Private="false" />
<Reference Remove="$(UnhollowedLibsFolder)/netstandard.dll" />
<Reference Remove="$(UnhollowedLibsFolder)/Newtonsoft.Json.dll" />
</ItemGroup>
<!-- Shared library -->
<ItemGroup Condition="'$(MSBuildProjectName)' != 'QoL.Common'">
<ProjectReference Include="..\QoL.Common\QoL.Common.csproj" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Shared/Dependencies.props" />
<PropertyGroup>
<Version>1.0.0</Version>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
</PropertyGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment