Browse Source

Add ILRepack and LZMA packages

habeebweeb 4 years ago
parent
commit
268ef17da9
2 changed files with 18 additions and 13 deletions
  1. 0 13
      MultipleMaids/ILRepack.targets
  2. 18 0
      MultipleMaids/MultipleMaids.csproj

+ 0 - 13
MultipleMaids/ILRepack.targets

@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-    <Target Name="ILRepacker" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
-
-        <ItemGroup>
-            <InputAssemblies Include="$(OutputPath)\$(AssemblyName).dll" />
-            <InputAssemblies Include="$(OutputPath)\SevenZip.dll" />
-        </ItemGroup>
-
-        <ILRepack LibraryPath=".\lib\" Parallel="true" Internalize="true" InputAssemblies="@(InputAssemblies)" TargetKind="Dll" OutputFile="$(OutputPath)\$(AssemblyName).dll" />
-
-    </Target>
-</Project>

+ 18 - 0
MultipleMaids/MultipleMaids.csproj

@@ -6,6 +6,11 @@
 	<AssemblyName>COM3D2.MultipleMaids.Plugin</AssemblyName>
   </PropertyGroup>
   <ItemGroup>
+    <PackageReference Include="ILRepack" Version="2.0.18" />
+    <PackageReference Include="ILRepack.MSBuild.Task" Version="2.0.13" />
+    <PackageReference Include="LZMA-SDK" Version="18.1.0" />
+  </ItemGroup>
+  <ItemGroup>
     <Reference Include="Assembly-CSharp">
       <HintPath>lib\Assembly-CSharp.dll</HintPath>
     </Reference>
@@ -25,4 +30,17 @@
       <HintPath>lib\UnityInjector.dll</HintPath>
     </Reference>
   </ItemGroup>
+
+  <Target Name="ILRepack" AfterTargets="Build">
+    <PropertyGroup>
+      <WorkingDirectory>$(MSBuildThisFileDirectory)bin\$(Configuration)\$(TargetFramework)</WorkingDirectory>
+    </PropertyGroup>
+    <ItemGroup>
+      <InputAssemblies Include="$(AssemblyName).dll" />
+      <InputAssemblies Include="SevenZip.dll" />
+    </ItemGroup>
+
+    <ILRepack MainAssembly="$(AssemblyName).dll" Parallel="true" Internalize="true" OutputAssembly="$(AssemblyName).dll" InputAssemblies="@(InputAssemblies)" OutputType="Dll" WorkingDirectory="$(WorkingDirectory)" />
+
+  </Target>
 </Project>