File tree Expand file tree Collapse file tree 6 files changed +32
-12
lines changed Expand file tree Collapse file tree 6 files changed +32
-12
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,10 @@ namespace Cpp2IL.Core.Attributes;
7
7
[ AttributeUsage ( AttributeTargets . Assembly , AllowMultiple = true ) ]
8
8
public class RegisterCpp2IlPluginAttribute : Attribute
9
9
{
10
- #if NET6_0
11
10
[ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicParameterlessConstructor ) ]
12
- #endif
13
11
public Type PluginType { get ; }
14
12
15
- public RegisterCpp2IlPluginAttribute ( Type pluginType )
13
+ public RegisterCpp2IlPluginAttribute ( [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicParameterlessConstructor ) ] Type pluginType )
16
14
{
17
15
if ( ! typeof ( Cpp2IlPlugin ) . IsAssignableFrom ( pluginType ) )
18
16
throw new ArgumentException ( "Plugin type to register must extend Cpp2IlPlugin" , nameof ( pluginType ) ) ;
@@ -22,4 +20,4 @@ public RegisterCpp2IlPluginAttribute(Type pluginType)
22
20
23
21
PluginType = pluginType ;
24
22
}
25
- }
23
+ }
Original file line number Diff line number Diff line change 16
16
<PublishRepositoryUrl >true</PublishRepositoryUrl >
17
17
<RepositoryType >git</RepositoryType >
18
18
<RepositoryUrl >https://github.com/SamboyCoding/Cpp2IL.git</RepositoryUrl >
19
- <TargetFrameworks >net7.0;net6.0;netstandard2.0</TargetFrameworks >
19
+ <TargetFrameworks >net8.0; net7.0;net6.0;netstandard2.0</TargetFrameworks >
20
20
<Title >Cpp2IL.Core</Title >
21
21
<VersionPrefix >2022.1.0</VersionPrefix >
22
- <!-- Plugins make this non-trimmable-->
23
22
24
23
<ContinuousIntegrationBuild Condition =" '$(GITHUB_ACTIONS)' == 'true'" >true</ContinuousIntegrationBuild >
24
+ <PolySharpIncludeRuntimeSupportedAttributes >true</PolySharpIncludeRuntimeSupportedAttributes >
25
+ </PropertyGroup >
26
+
27
+ <PropertyGroup Condition =" $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" >
28
+ <IsTrimmable >true</IsTrimmable >
29
+ </PropertyGroup >
30
+
31
+ <PropertyGroup Condition =" $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))" >
32
+ <IsAotCompatible >true</IsAotCompatible >
25
33
</PropertyGroup >
26
34
27
35
<ItemGroup >
40
48
<!-- Not used at runtime, but needed for the build-->
41
49
<PackageReference Include =" Microsoft.SourceLink.GitHub" Version =" 1.1.1" PrivateAssets =" All" />
42
50
43
- <PackageReference Include =" PolySharp" Version =" 1.12 .1" PrivateAssets =" all" IncludeAssets =" runtime; build; native; contentfiles; analyzers; buildtransitive" />
51
+ <PackageReference Include =" PolySharp" Version =" 1.14 .1" PrivateAssets =" all" IncludeAssets =" runtime; build; native; contentfiles; analyzers; buildtransitive" />
44
52
</ItemGroup >
45
53
46
54
<ItemGroup Condition =" '$(TargetFramework)' != 'net6.0'" >
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public static class Cpp2IlApi
20
20
{
21
21
public static ApplicationAnalysisContext ? CurrentAppContext ;
22
22
23
+ [ RequiresUnreferencedCode ( "Plugins are loaded dynamically." ) ]
23
24
public static void Init ( string pluginsDir = "Plugins" )
24
25
{
25
26
Cpp2IlPluginManager . LoadFromDirectory ( Path . Combine ( Environment . CurrentDirectory , pluginsDir ) ) ;
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . Diagnostics . CodeAnalysis ;
3
4
using System . IO ;
4
5
using System . Linq ;
5
6
using System . Reflection ;
@@ -13,6 +14,7 @@ public static class Cpp2IlPluginManager
13
14
{
14
15
private static List < Cpp2IlPlugin > _loadedPlugins = new ( ) ;
15
16
17
+ [ RequiresUnreferencedCode ( "Plugins are loaded dynamically." ) ]
16
18
internal static void LoadFromDirectory ( string pluginsDir )
17
19
{
18
20
Logger . InfoNewline ( $ "Loading plugins from { pluginsDir } ...", "Plugins" ) ;
@@ -101,4 +103,4 @@ public static void CallOnFinish()
101
103
cpp2IlPlugin . CallOnFinish ( ) ;
102
104
}
103
105
}
104
- }
106
+ }
Original file line number Diff line number Diff line change 17
17
<PublishRepositoryUrl >true</PublishRepositoryUrl >
18
18
<Description >Library for interacting with IL2CPP metadata and binaries</Description >
19
19
<Configurations >Debug;Release</Configurations >
20
- <TargetFrameworks >net7.0;net6.0;netstandard2.0</TargetFrameworks >
20
+ <TargetFrameworks >net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks >
21
+ <PolySharpIncludeRuntimeSupportedAttributes >true</PolySharpIncludeRuntimeSupportedAttributes >
21
22
</PropertyGroup >
22
23
23
24
<PropertyGroup Condition =" $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" >
24
25
<IsTrimmable >true</IsTrimmable >
25
26
</PropertyGroup >
26
27
28
+ <PropertyGroup Condition =" $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))" >
29
+ <IsAotCompatible >true</IsAotCompatible >
30
+ </PropertyGroup >
31
+
27
32
<ItemGroup >
28
33
<PackageReference Include =" AssetRipper.Primitives" Version =" 2.1.0" />
34
+ <PackageReference Include =" PolySharp" Version =" 1.14.1" PrivateAssets =" all" IncludeAssets =" runtime; build; native; contentfiles; analyzers; buildtransitive" />
29
35
</ItemGroup >
30
36
31
37
<ItemGroup Condition =" '$(TargetFramework)' != 'net6.0'" >
32
- <PackageReference Include =" IndexRange" Version =" 1.0.2" />
33
38
<PackageReference Include =" System.Memory" Version =" 4.5.5" />
34
- <PackageReference Include =" Nullable" Version =" 1.3.1" PrivateAssets =" all" IncludeAssets =" runtime; build; native; contentfiles; analyzers; buildtransitive" />
35
39
</ItemGroup >
36
40
37
41
<ItemGroup >
Original file line number Diff line number Diff line change 15
15
<RepositoryUrl >https://github.com/SamboyCoding/Cpp2IL.git</RepositoryUrl >
16
16
<PublishRepositoryUrl >true</PublishRepositoryUrl >
17
17
<Description >Simple, zero-dependency disassembler for WebAssembly bytecode</Description >
18
- <TargetFrameworks >net7.0;net6.0;netstandard2.0</TargetFrameworks >
18
+ <TargetFrameworks >net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks >
19
+ </PropertyGroup >
20
+
21
+ <PropertyGroup Condition =" $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" >
19
22
<IsTrimmable >true</IsTrimmable >
20
23
</PropertyGroup >
21
24
25
+ <PropertyGroup Condition =" $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))" >
26
+ <IsAotCompatible >true</IsAotCompatible >
27
+ </PropertyGroup >
28
+
22
29
</Project >
You can’t perform that action at this time.
0 commit comments