diff --git a/Cpp2IL.Core/Attributes/RegisterCpp2IlPluginAttribute.cs b/Cpp2IL.Core/Attributes/RegisterCpp2IlPluginAttribute.cs index 37abf67d..d333aba9 100644 --- a/Cpp2IL.Core/Attributes/RegisterCpp2IlPluginAttribute.cs +++ b/Cpp2IL.Core/Attributes/RegisterCpp2IlPluginAttribute.cs @@ -7,12 +7,10 @@ namespace Cpp2IL.Core.Attributes; [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] public class RegisterCpp2IlPluginAttribute : Attribute { -#if NET6_0 [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] -#endif public Type PluginType { get; } - public RegisterCpp2IlPluginAttribute(Type pluginType) + public RegisterCpp2IlPluginAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type pluginType) { if (!typeof(Cpp2IlPlugin).IsAssignableFrom(pluginType)) throw new ArgumentException("Plugin type to register must extend Cpp2IlPlugin", nameof(pluginType)); @@ -22,4 +20,4 @@ public RegisterCpp2IlPluginAttribute(Type pluginType) PluginType = pluginType; } -} \ No newline at end of file +} diff --git a/Cpp2IL.Core/Cpp2IL.Core.csproj b/Cpp2IL.Core/Cpp2IL.Core.csproj index 8480cb43..1f34073f 100644 --- a/Cpp2IL.Core/Cpp2IL.Core.csproj +++ b/Cpp2IL.Core/Cpp2IL.Core.csproj @@ -16,12 +16,20 @@ true git https://github.com/SamboyCoding/Cpp2IL.git - net7.0;net6.0;netstandard2.0 + net8.0;net7.0;net6.0;netstandard2.0 Cpp2IL.Core 2022.1.0 - true + true + + + + true + + + + true @@ -40,7 +48,7 @@ - + diff --git a/Cpp2IL.Core/Cpp2IlApi.cs b/Cpp2IL.Core/Cpp2IlApi.cs index 8f3ec6ee..37b4d0ae 100644 --- a/Cpp2IL.Core/Cpp2IlApi.cs +++ b/Cpp2IL.Core/Cpp2IlApi.cs @@ -20,6 +20,7 @@ public static class Cpp2IlApi { public static ApplicationAnalysisContext? CurrentAppContext; + [RequiresUnreferencedCode("Plugins are loaded dynamically.")] public static void Init(string pluginsDir = "Plugins") { Cpp2IlPluginManager.LoadFromDirectory(Path.Combine(Environment.CurrentDirectory, pluginsDir)); diff --git a/Cpp2IL.Core/Cpp2IlPluginManager.cs b/Cpp2IL.Core/Cpp2IlPluginManager.cs index e7d20e68..28e03ab5 100644 --- a/Cpp2IL.Core/Cpp2IlPluginManager.cs +++ b/Cpp2IL.Core/Cpp2IlPluginManager.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Reflection; @@ -13,6 +14,7 @@ public static class Cpp2IlPluginManager { private static List _loadedPlugins = new(); + [RequiresUnreferencedCode("Plugins are loaded dynamically.")] internal static void LoadFromDirectory(string pluginsDir) { Logger.InfoNewline($"Loading plugins from {pluginsDir}...", "Plugins"); @@ -101,4 +103,4 @@ public static void CallOnFinish() cpp2IlPlugin.CallOnFinish(); } } -} \ No newline at end of file +} diff --git a/LibCpp2IL/LibCpp2IL.csproj b/LibCpp2IL/LibCpp2IL.csproj index f8612135..9b555dd6 100644 --- a/LibCpp2IL/LibCpp2IL.csproj +++ b/LibCpp2IL/LibCpp2IL.csproj @@ -17,21 +17,25 @@ true Library for interacting with IL2CPP metadata and binaries Debug;Release - net7.0;net6.0;netstandard2.0 + net8.0;net7.0;net6.0;netstandard2.0 + true true + + true + + + - - diff --git a/WasmDisassembler/WasmDisassembler.csproj b/WasmDisassembler/WasmDisassembler.csproj index 391329bd..38f5ce39 100644 --- a/WasmDisassembler/WasmDisassembler.csproj +++ b/WasmDisassembler/WasmDisassembler.csproj @@ -15,8 +15,15 @@ https://github.com/SamboyCoding/Cpp2IL.git true Simple, zero-dependency disassembler for WebAssembly bytecode - net7.0;net6.0;netstandard2.0 + net8.0;net7.0;net6.0;netstandard2.0 + + + true + + true + +