c# kernel compile error

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
rafroad
Posts: 2
Joined: Mon Jul 10, 2023 6:05 pm

c# kernel compile error

Post 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?
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: c# kernel compile error

Post 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.
rafroad
Posts: 2
Joined: Mon Jul 10, 2023 6:05 pm

Re: c# kernel compile error

Post 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
Post Reply