Page 1 of 1

c# kernel compile error

Posted: Mon Jul 10, 2023 6:40 pm
by rafroad
i was following the bare bones wiki guide on c# development https://wiki.osdev.org/C_Sharp_Bare_Bones but i get an error when i compile the example kernel

Code: Select all

tysila2.exe --arch i586-elf-tysos -fno-rtti -o kernel.o kernel.exe

Unhandled Exception: System.ArgumentException: Value does not fall within the expected range.
   at System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(Array array, RuntimeFieldHandle fldHandle)
   at libtysila.PEFile.ReadResolutionScope(Stream file, Metadata m)
   at libtysila.PEFile.GetMetadata(Assembler @$$)
   at libtysila.Metadata.LoadAssembly(String mod_name, Assembler @$$, String output_name)
   at tysila.Program.Main(String[] args)
is there any way to fix this?

Re: c# kernel compile error

Posted: Wed Jul 12, 2023 1:50 am
by iansjack
Did you compile tysila from source or did you download the precompiled binary? Could this be relevant
Please note these binaries will not work on 64-bit Windows due to a bug in the current Microsoft CLR (see here) so instead you must build it from source.

Re: c# kernel compile error

Posted: Wed Jul 12, 2023 5:37 pm
by rafroad
iansjack wrote:Did you compile tysila from source or did you download the precompiled binary? Could this be relevant
Please note these binaries will not work on 64-bit Windows due to a bug in the current Microsoft CLR (see here) so instead you must build it from source.
it works thx a lot i have to compile it myself