supabase-community/supabase-csharp

System.BadImageFormatException: 'Could not load file or assembly 'Supabase, Version=0.8.4.0, Culture=neutral, PublicKeyToken=null'

SebastianDuval opened this issue · 3 comments

Bug report

Describe the bug

I'm trying to use Supabase in a Gamemaker project. In order to do so, I'm creating a DLL in Visual Studio, which can then be used inside Gamemaker as an extension. I've done this many times before for all sorts of things. This time though, when I run my built game, it throws an error the second a function from my extension is used. When using the VS debugger, it says the following:

System.BadImageFormatException: 'Could not load file or assembly 'Supabase, Version=0.8.4.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The module was expected to contain an assembly manifest.'

To Reproduce

I don't expect anyone here to own Gamemaker and having any kind of experience with extension creation for Gamemaker. If needed/wanted, I can of course add to this paragraph.

Expected behavior

No exception or error.

System information

  • OS: Windows 11
  • Version of supabase-csharp: 0.8.4

Additional context

Any help would be appreciated!

Best regards

Any chance it’s a 32-bit/64-bit issue?

https://stackoverflow.com/a/5229433

It's a possibility, of course.

A few versions ago, Gamemaker completely dropped support for creating 32-bit executables, so dlls have to be compiled for 64-bit.
In Visual Studio

  • in the toolbar, I set the dropdowns to Release and x64
  • at Build > Configuration Manager, I set Platform to x64 for this project
  • at Project properties > Build Tab, I set Platform target to x64
  • the build output says

------ Build started: Project: SD_Supabase, Configuration: Release x64 ------

Is there anything I might have overlooked?

Thanks for your help btw!

@SebastianDuval I'm sorry, it seems like it's a compilation/built time issue - but I have no experience with Gamemaker and what kind of compilation is needed. So I'm not going to be much help!