alias Mono.Cecil references (#711)

This is needed to migrate to Harmony 2.0 because it uses MonoMod, which has a copy of Mono.Cecil merged into its assembly, which leads to "type X exists in both 0Harmony.dll and Mono.Cecil.dll" errors. We can't use the version bundled with MonoMod since only some of the types are publicly accessible.
This commit is contained in:
Jesse Plamondon-Willard 2021-07-11 01:44:02 -04:00
parent 8f96a97f07
commit bd20c2e137
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
24 changed files with 89 additions and 41 deletions

View File

@ -1,5 +1,7 @@
extern alias MonoCecilPackage;
using System.Collections.Generic;
using Mono.Cecil;
using MonoCecilPackage.Mono.Cecil;
namespace StardewModdingAPI.Framework.ModLoading
{

View File

@ -1,10 +1,12 @@
extern alias MonoCecilPackage;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.Exceptions;
using StardewModdingAPI.Framework.ModLoading.Framework;
using StardewModdingAPI.Metadata;

View File

@ -1,5 +1,7 @@
extern alias MonoCecilPackage;
using System.IO;
using Mono.Cecil;
using MonoCecilPackage.Mono.Cecil;
namespace StardewModdingAPI.Framework.ModLoading
{

View File

@ -1,5 +1,7 @@
using Mono.Cecil;
using Mono.Cecil.Cil;
extern alias MonoCecilPackage;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Finders

View File

@ -1,5 +1,7 @@
using Mono.Cecil;
using Mono.Cecil.Cil;
extern alias MonoCecilPackage;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Finders

View File

@ -1,5 +1,7 @@
using Mono.Cecil;
using Mono.Cecil.Cil;
extern alias MonoCecilPackage;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Finders

View File

@ -1,5 +1,7 @@
using Mono.Cecil;
using Mono.Cecil.Cil;
extern alias MonoCecilPackage;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Finders

View File

@ -1,7 +1,9 @@
extern alias MonoCecilPackage;
using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Finders

View File

@ -1,6 +1,8 @@
extern alias MonoCecilPackage;
using System.Collections.Generic;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Finders

View File

@ -1,5 +1,7 @@
extern alias MonoCecilPackage;
using System;
using Mono.Cecil;
using MonoCecilPackage.Mono.Cecil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Finders

View File

@ -1,5 +1,7 @@
extern alias MonoCecilPackage;
using System;
using Mono.Cecil;
using MonoCecilPackage.Mono.Cecil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Finders

View File

@ -1,7 +1,9 @@
extern alias MonoCecilPackage;
using System;
using System.Collections.Generic;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
namespace StardewModdingAPI.Framework.ModLoading.Framework
{

View File

@ -1,9 +1,11 @@
extern alias MonoCecilPackage;
using System;
using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Collections.Generic;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Collections.Generic;
namespace StardewModdingAPI.Framework.ModLoading.Framework
{

View File

@ -1,8 +1,10 @@
extern alias MonoCecilPackage;
using System;
using System.Linq;
using System.Reflection;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage::Mono.Cecil;
using MonoCecilPackage::Mono.Cecil.Cil;
namespace StardewModdingAPI.Framework.ModLoading.Framework
{

View File

@ -1,7 +1,9 @@
extern alias MonoCecilPackage;
using System;
using System.Collections.Generic;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
namespace StardewModdingAPI.Framework.ModLoading
{

View File

@ -1,8 +1,10 @@
extern alias MonoCecilPackage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Mono.Cecil;
using MonoCecilPackage.Mono.Cecil;
using StardewModdingAPI.Toolkit.Utilities;
namespace StardewModdingAPI.Framework.ModLoading

View File

@ -1,7 +1,9 @@
extern alias MonoCecilPackage;
using System;
using System.Reflection;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Rewriters

View File

@ -1,8 +1,10 @@
#if HARMONY_2
extern alias MonoCecilPackage;
using System;
using HarmonyLib;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
using StardewModdingAPI.Framework.ModLoading.RewriteFacades;

View File

@ -1,7 +1,9 @@
extern alias MonoCecilPackage;
using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Rewriters

View File

@ -1,7 +1,9 @@
extern alias MonoCecilPackage;
using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Rewriters

View File

@ -1,7 +1,9 @@
extern alias MonoCecilPackage;
using System;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoCecilPackage.Mono.Cecil;
using MonoCecilPackage.Mono.Cecil.Cil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Rewriters

View File

@ -1,5 +1,7 @@
extern alias MonoCecilPackage;
using System;
using Mono.Cecil;
using MonoCecilPackage.Mono.Cecil;
using StardewModdingAPI.Framework.ModLoading.Framework;
namespace StardewModdingAPI.Framework.ModLoading.Rewriters

View File

@ -1,7 +1,9 @@
extern alias MonoCecilPackage;
using System;
using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;
using MonoCecilPackage.Mono.Cecil;
namespace StardewModdingAPI.Framework.ModLoading
{

View File

@ -20,7 +20,9 @@
<ItemGroup>
<PackageReference Include="LargeAddressAware" Version="1.0.5" />
<PackageReference Include="Mono.Cecil" Version="0.11.3" />
<PackageReference Include="Mono.Cecil" Version="0.11.3">
<Aliases>MonoCecilPackage</Aliases>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Platonymous.TMXTile" Version="1.5.8" />
</ItemGroup>