BepInEx.Patcher.csproj 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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>embedded</DebugType>
  23. <Optimize>false</Optimize>
  24. <OutputPath>..\bin\</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\</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. <ItemGroup>
  46. <Reference Include="Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
  47. <HintPath>..\packages\Mono.Cecil.0.10.0\lib\net35\Mono.Cecil.dll</HintPath>
  48. <Private>True</Private>
  49. </Reference>
  50. <Reference Include="System" />
  51. <Reference Include="System.Core" />
  52. <Reference Include="System.Xml.Linq" />
  53. <Reference Include="System.Data.DataSetExtensions" />
  54. <Reference Include="System.Data" />
  55. <Reference Include="System.Xml" />
  56. </ItemGroup>
  57. <ItemGroup>
  58. <Compile Include="EmbeddedResource.cs" />
  59. <Compile Include="Program.cs" />
  60. <Compile Include="Properties\AssemblyInfo.cs" />
  61. </ItemGroup>
  62. <ItemGroup>
  63. <None Include="packages.config" />
  64. </ItemGroup>
  65. <ItemGroup />
  66. <ItemGroup>
  67. <EmbeddedResource Include="..\bin\0Harmony.dll" />
  68. <EmbeddedResource Include="..\bin\BepInEx.dll" />
  69. </ItemGroup>
  70. <Import Project="..\BepInEx.Common\BepInEx.Common.projitems" Label="Shared" />
  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.2.0.15\build\ILRepack.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILRepack.2.0.15\build\ILRepack.props'))" />
  77. <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'))" />
  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)\0Harmony.dll" />
  89. <Delete Files="$(OutputPath)\BepInEx.dll" />
  90. </Target>
  91. <!-- /ILRepack -->
  92. <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')" />
  93. </Project>