Repository navigation
Replies: 1 comment 1 reply
|
a couple things, .NET Framework is a larger framework than .NET Standard 2.1. That said, the framework you should target should match the framework the game uses. When importing the game with ThunderKit, I believe that should get set automatically (I'm a bit rusty on this bit, so I'm not really sure that it is truly reliable) If you can confirm the game targets .NET Framework, then that is what you should use to keep your code aligned with the game. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
I have a ThunderKit project for aloft. One of the parts of that project includes a plugin,
AloftModLoader. That mod loader is doing some transpiles (via harmony) to rewrite a few of the methods in the game to make the plugin work the way it needs to.As a part of that transpile, it's using a
Labelclass from System.Reflection.Emit. However, the project is incredibly moody when building and spits out a few related errors. It appears that these errors are because theAloftModLoaderis hitting a few references to the engine. I appear to be able to fix them by changing Unity to target.NET Frameworkinstead of.NET Standard 2.1. I also appear to be able to resolve that mismatch by disabling editor references... However, I need at least some of those references forMonobehaviourandGameObject.Instantiate.error CS7069: Reference to type 'Label' claims it is defined in 'mscorlib', but it could not be founderror CS1503: Argument 1: cannot convert from 'System.Reflection.Emit.Label [C:\Program Files\Unity\Hub\Editor\2021.3.12f1\Editor\Data\NetStandard\ref\2.1.0\netstandard.dll]' to 'System.Reflection.Emit.Label [C:\Program Files\Unity\Hub\Editor\2021.3.12f1\Editor\Data\NetStandard\compat\2.1.0\shims\netfx\mscorlib.dll]'It doesn't seem like the end of the world to target
.NET frameworkinstead of standard, but at the same time it seems like its artificially reducing compatibility for something that I would imagine should not have to be reduced. Is there some recommendations or insight into the way to set these up? I REALLY like the ThunderKit workflow (aside from the asset staging bundle file being janky), and I would rather keep that mod loader as part of the projects rather than having it as a standalone library floating outside of ThunderKit. My dependency tree would look like this: AloftModFramework (Thunderkit) -> Aloft Mod Loader (external) -> Other Plugins (Thunderkit). And that flow seems worse than I'd care to imagine (already tried it once and it's got lots of little needles).--
TLDR: how should I include/set up a plugin (assembly definition) that needs System.Reflection.Emit into a ThunderKit project without erroring out for
System.Reflection.Emit.Labelnot being convertable when Unity is targeting.NET Standard 2.1(or should it just not target that?).All reactions