BepInEx.Patcher.csproj 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <Import Project="..\packages\ILRepack.2.0.16\build\ILRepack.props" Condition="Exists('..\packages\ILRepack.2.0.16\build\ILRepack.props')" />
  4. <Import Project="..\packages\ILRepack.MSBuild.Task.2.0.13\build\ILRepack.MSBuild.Task.props" Condition="Exists('..\packages\ILRepack.MSBuild.Task.2.0.13\build\ILRepack.MSBuild.Task.props')" />
  5. <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  6. <PropertyGroup>
  7. <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
  8. <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
  9. <ProjectGuid>{DC89F18B-235B-4C01-AB31-AF40DCE5C4C7}</ProjectGuid>
  10. <OutputType>Exe</OutputType>
  11. <RootNamespace>BepInEx.Patcher</RootNamespace>
  12. <AssemblyName>BepInEx.Patcher</AssemblyName>
  13. <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  14. <FileAlignment>512</FileAlignment>
  15. <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  16. <TargetFrameworkProfile />
  17. <NuGetPackageImportStamp>
  18. </NuGetPackageImportStamp>
  19. </PropertyGroup>
  20. <PropertyGroup>
  21. <StartupObject>BepInEx.Patcher.Program</StartupObject>
  22. </PropertyGroup>
  23. <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Legacy|AnyCPU'">
  24. <DebugSymbols>true</DebugSymbols>
  25. <OutputPath>..\bin\patcher\</OutputPath>
  26. <DefineConstants>TRACE</DefineConstants>
  27. <Optimize>true</Optimize>
  28. <DebugType>embedded</DebugType>
  29. <PlatformTarget>AnyCPU</PlatformTarget>
  30. <ErrorReport>prompt</ErrorReport>
  31. <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
  32. </PropertyGroup>
  33. <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'v2018|AnyCPU'">
  34. <DebugSymbols>true</DebugSymbols>
  35. <OutputPath>..\bin\patcher\</OutputPath>
  36. <DefineConstants>TRACE;UNITY_2018</DefineConstants>
  37. <Optimize>true</Optimize>
  38. <DebugType>embedded</DebugType>
  39. <PlatformTarget>AnyCPU</PlatformTarget>
  40. <ErrorReport>prompt</ErrorReport>
  41. <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
  42. </PropertyGroup>
  43. <ItemGroup>
  44. <Reference Include="Mono.Cecil, Version=0.10.3.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
  45. <HintPath>..\packages\Mono.Cecil.0.10.3\lib\net35\Mono.Cecil.dll</HintPath>
  46. </Reference>
  47. <Reference Include="Mono.Cecil.Mdb, Version=0.10.3.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
  48. <HintPath>..\packages\Mono.Cecil.0.10.3\lib\net35\Mono.Cecil.Mdb.dll</HintPath>
  49. </Reference>
  50. <Reference Include="Mono.Cecil.Pdb, Version=0.10.3.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
  51. <HintPath>..\packages\Mono.Cecil.0.10.3\lib\net35\Mono.Cecil.Pdb.dll</HintPath>
  52. </Reference>
  53. <Reference Include="Mono.Cecil.Rocks, Version=0.10.3.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
  54. <HintPath>..\packages\Mono.Cecil.0.10.3\lib\net35\Mono.Cecil.Rocks.dll</HintPath>
  55. </Reference>
  56. <Reference Include="System" />
  57. <Reference Include="System.Core" />
  58. </ItemGroup>
  59. <ItemGroup>
  60. <Compile Include="EmbeddedResource.cs" />
  61. <Compile Include="Program.cs" />
  62. <Compile Include="Properties\AssemblyInfo.cs" />
  63. </ItemGroup>
  64. <ItemGroup>
  65. <None Include="packages.config" />
  66. </ItemGroup>
  67. <ItemGroup />
  68. <ItemGroup>
  69. <EmbeddedResource Include="..\bin\patcher\BepInEx.Bootstrap.dll" />
  70. </ItemGroup>
  71. <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  72. <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
  73. <PropertyGroup>
  74. <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
  75. </PropertyGroup>
  76. <Error Condition="!Exists('..\packages\ILRepack.MSBuild.Task.2.0.13\build\ILRepack.MSBuild.Task.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILRepack.MSBuild.Task.2.0.13\build\ILRepack.MSBuild.Task.props'))" />
  77. <Error Condition="!Exists('..\packages\ILRepack.2.0.16\build\ILRepack.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILRepack.2.0.16\build\ILRepack.props'))" />
  78. </Target>
  79. <!-- ILRepack -->
  80. <Target Name="AfterBuild">
  81. <Move SourceFiles="$(OutputPath)\$(AssemblyName).exe" DestinationFiles="$(OutputPath)\$(AssemblyName)1.exe" />
  82. <ItemGroup>
  83. <InputAssemblies Include="$(OutputPath)\$(AssemblyName)1.exe" />
  84. <InputAssemblies Include="$(OutputPath)\Mono.Cecil.dll" />
  85. </ItemGroup>
  86. <ILRepack Parallel="true" Internalize="true" DebugInfo="true" PrimaryAssemblyFile="$(OutputPath)\$(AssemblyName)1.exe" InputAssemblies="@(InputAssemblies)" TargetKind="Exe" TargetPlatformVersion="v2" OutputFile="$(OutputPath)\$(AssemblyName).exe" />
  87. <Delete Files="@(InputAssemblies)" />
  88. <Delete Files="$(OutputPath)\BepInEx.Bootstrap.dll" />
  89. </Target>
  90. <!-- /ILRepack -->
  91. </Project>