BepInEx.Patcher.csproj 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.15\build\ILRepack.props" Condition="Exists('..\packages\ILRepack.2.0.15\build\ILRepack.props')" />
  4. <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  5. <PropertyGroup>
  6. <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
  7. <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
  8. <ProjectGuid>{DC89F18B-235B-4C01-AB31-AF40DCE5C4C7}</ProjectGuid>
  9. <OutputType>Exe</OutputType>
  10. <RootNamespace>BepInEx.Patcher</RootNamespace>
  11. <AssemblyName>BepInEx.Patcher</AssemblyName>
  12. <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  13. <FileAlignment>512</FileAlignment>
  14. <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  15. <TargetFrameworkProfile />
  16. <NuGetPackageImportStamp>
  17. </NuGetPackageImportStamp>
  18. </PropertyGroup>
  19. <PropertyGroup>
  20. <StartupObject>BepInEx.Patcher.Program</StartupObject>
  21. </PropertyGroup>
  22. <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Legacy|AnyCPU'">
  23. <DebugSymbols>true</DebugSymbols>
  24. <OutputPath>..\bin\patcher\</OutputPath>
  25. <DefineConstants>TRACE</DefineConstants>
  26. <Optimize>true</Optimize>
  27. <DebugType>embedded</DebugType>
  28. <PlatformTarget>AnyCPU</PlatformTarget>
  29. <ErrorReport>prompt</ErrorReport>
  30. <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
  31. </PropertyGroup>
  32. <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'v2018|AnyCPU'">
  33. <DebugSymbols>true</DebugSymbols>
  34. <OutputPath>..\bin\patcher\</OutputPath>
  35. <DefineConstants>TRACE;UNITY_2018</DefineConstants>
  36. <Optimize>true</Optimize>
  37. <DebugType>embedded</DebugType>
  38. <PlatformTarget>AnyCPU</PlatformTarget>
  39. <ErrorReport>prompt</ErrorReport>
  40. <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
  41. </PropertyGroup>
  42. <ItemGroup>
  43. <Reference Include="Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
  44. <HintPath>..\packages\Mono.Cecil.0.10.0\lib\net35\Mono.Cecil.dll</HintPath>
  45. <Private>True</Private>
  46. </Reference>
  47. <Reference Include="System" />
  48. <Reference Include="System.Core" />
  49. </ItemGroup>
  50. <ItemGroup>
  51. <Compile Include="EmbeddedResource.cs" />
  52. <Compile Include="Program.cs" />
  53. <Compile Include="Properties\AssemblyInfo.cs" />
  54. </ItemGroup>
  55. <ItemGroup>
  56. <None Include="packages.config" />
  57. </ItemGroup>
  58. <ItemGroup />
  59. <ItemGroup>
  60. <EmbeddedResource Include="..\bin\patcher\BepInEx.Bootstrap.dll" />
  61. </ItemGroup>
  62. <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  63. <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
  64. <PropertyGroup>
  65. <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>
  66. </PropertyGroup>
  67. <Error Condition="!Exists('..\packages\ILRepack.2.0.15\build\ILRepack.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILRepack.2.0.15\build\ILRepack.props'))" />
  68. <Error Condition="!Exists('..\packages\ILRepack.MSBuild.Task.1.0.9\build\ILRepack.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILRepack.MSBuild.Task.1.0.9\build\ILRepack.MSBuild.Task.targets'))" />
  69. </Target>
  70. <!-- ILRepack -->
  71. <Target Name="AfterBuild">
  72. <Move SourceFiles="$(OutputPath)\$(AssemblyName).exe" DestinationFiles="$(OutputPath)\$(AssemblyName)1.exe" />
  73. <ItemGroup>
  74. <InputAssemblies Include="$(OutputPath)\$(AssemblyName)1.exe" />
  75. <InputAssemblies Include="$(OutputPath)\Mono.Cecil.dll" />
  76. </ItemGroup>
  77. <ILRepack Parallel="true" Internalize="true" DebugInfo="true" PrimaryAssemblyFile="$(OutputPath)\$(AssemblyName)1.exe" InputAssemblies="@(InputAssemblies)" TargetKind="Exe" TargetPlatformVersion="v2" OutputFile="$(OutputPath)\$(AssemblyName).exe" />
  78. <Delete Files="@(InputAssemblies)" />
  79. <Delete Files="$(OutputPath)\BepInEx.Bootstrap.dll" />
  80. </Target>
  81. <!-- /ILRepack -->
  82. <Import Project="..\packages\ILRepack.MSBuild.Task.1.0.9\build\ILRepack.MSBuild.Task.targets" Condition="Exists('..\packages\ILRepack.MSBuild.Task.1.0.9\build\ILRepack.MSBuild.Task.targets')" />
  83. </Project>