BepInEx.Patcher.csproj 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  20. <PlatformTarget>AnyCPU</PlatformTarget>
  21. <DebugSymbols>true</DebugSymbols>
  22. <DebugType>full</DebugType>
  23. <Optimize>false</Optimize>
  24. <OutputPath>..\bin\patcher\</OutputPath>
  25. <DefineConstants>DEBUG;TRACE</DefineConstants>
  26. <ErrorReport>prompt</ErrorReport>
  27. <WarningLevel>4</WarningLevel>
  28. <Prefer32Bit>false</Prefer32Bit>
  29. <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
  30. </PropertyGroup>
  31. <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  32. <PlatformTarget>AnyCPU</PlatformTarget>
  33. <DebugType>embedded</DebugType>
  34. <Optimize>true</Optimize>
  35. <OutputPath>..\bin\patcher\</OutputPath>
  36. <DefineConstants>TRACE</DefineConstants>
  37. <ErrorReport>prompt</ErrorReport>
  38. <WarningLevel>4</WarningLevel>
  39. <Prefer32Bit>false</Prefer32Bit>
  40. <DebugSymbols>true</DebugSymbols>
  41. </PropertyGroup>
  42. <PropertyGroup>
  43. <StartupObject>BepInEx.Patcher.Program</StartupObject>
  44. </PropertyGroup>
  45. <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'v2018|AnyCPU'">
  46. <DebugSymbols>true</DebugSymbols>
  47. <OutputPath>..\bin\patcher\</OutputPath>
  48. <DefineConstants>TRACE;UNITY_2018</DefineConstants>
  49. <Optimize>true</Optimize>
  50. <DebugType>embedded</DebugType>
  51. <PlatformTarget>AnyCPU</PlatformTarget>
  52. <ErrorReport>prompt</ErrorReport>
  53. <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
  54. </PropertyGroup>
  55. <ItemGroup>
  56. <Reference Include="Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
  57. <HintPath>..\packages\Mono.Cecil.0.10.0\lib\net35\Mono.Cecil.dll</HintPath>
  58. <Private>True</Private>
  59. </Reference>
  60. <Reference Include="System" />
  61. <Reference Include="System.Core" />
  62. </ItemGroup>
  63. <ItemGroup>
  64. <Compile Include="EmbeddedResource.cs" />
  65. <Compile Include="Program.cs" />
  66. <Compile Include="Properties\AssemblyInfo.cs" />
  67. </ItemGroup>
  68. <ItemGroup>
  69. <None Include="packages.config" />
  70. </ItemGroup>
  71. <ItemGroup />
  72. <ItemGroup>
  73. <EmbeddedResource Include="..\bin\patcher\BepInEx.Bootstrap.dll" />
  74. </ItemGroup>
  75. <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  76. <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
  77. <PropertyGroup>
  78. <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>
  79. </PropertyGroup>
  80. <Error Condition="!Exists('..\packages\ILRepack.2.0.15\build\ILRepack.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILRepack.2.0.15\build\ILRepack.props'))" />
  81. <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'))" />
  82. </Target>
  83. <!-- ILRepack -->
  84. <Target Name="AfterBuild">
  85. <Move SourceFiles="$(OutputPath)\$(AssemblyName).exe" DestinationFiles="$(OutputPath)\$(AssemblyName)1.exe" />
  86. <ItemGroup>
  87. <InputAssemblies Include="$(OutputPath)\$(AssemblyName)1.exe" />
  88. <InputAssemblies Include="$(OutputPath)\Mono.Cecil.dll" />
  89. </ItemGroup>
  90. <ILRepack Parallel="true" Internalize="true" DebugInfo="true" PrimaryAssemblyFile="$(OutputPath)\$(AssemblyName)1.exe" InputAssemblies="@(InputAssemblies)" TargetKind="Exe" TargetPlatformVersion="v2" OutputFile="$(OutputPath)\$(AssemblyName).exe" />
  91. <Delete Files="@(InputAssemblies)" />
  92. <Delete Files="$(OutputPath)\BepInEx.Bootstrap.dll" />
  93. </Target>
  94. <!-- /ILRepack -->
  95. <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')" />
  96. </Project>