C++/CLI Dependency Issue

I'm trying to create a CLR project to utilize a C# class library in a game engine. I'm fairly certain the issue is on the C# side and not the game engine itself, my familiarity with the language and Visual Studio is extreemly limited so I haven't been able to make much progress on this problem for a few days. For reference, the project repo is here: https://github.com/ChronoVortex/GameMakerModManager
GitHub
GitHub - ChronoVortex/GameMakerModManager: Extension for loading Un...
Extension for loading UndertaleModTool projects natively in GameMaker - ChronoVortex/GameMakerModManager
8 Replies
Chrono Vortex
Chrono VortexOP3w ago
It seems to be crashing when it attempts to load the System.Text.Json dependency. This function from the library I'm using is outputting this error:
Chrono Vortex
Chrono VortexOP3w ago
And when I attach a debugger to the game, I get this output on crashing:
Chrono Vortex
Chrono VortexOP3w ago
It was pointed out to me by another source that this System.Text.Json seems to target .NET 9, while my project targets .NET 8. That doesn't make any sense to me though, because the library I'm using also targets .NET 8 and it has the same version of System.Text.Json (9.0.2) set in its NuGet as I do.
reflectronic
reflectronic3w ago
i would need more information to know for sure but i don’t think this scenario works actually, maybe there is a workaround
Chrono Vortex
Chrono VortexOP3w ago
I'm happy to give more info, what would you need to know?
reflectronic
reflectronic3w ago
put this file next to the vcxproj
reflectronic
reflectronic3w ago
then try again
Chrono Vortex
Chrono VortexOP3w ago
holy crap, that did it! function got called and behaved exactly as expected you're my hero, I've been banging my head against this wall for days

Did you find this page helpful?