SupinePandora43 / UltralightNet

.NET bindings for Ultralight next-gen HTML renderer
https://github.com/SupinePandora43/UltralightNet
MIT License
63 stars 10 forks source link

Does not work in .NET Framework | System.TypeLoadException #79

Closed DestroyerDarkNess closed 6 months ago

DestroyerDarkNess commented 6 months ago

Note: Tested on .NET Core 6.0 Worked fine. The problem is in the .NET Framework.

I suspect it's the way you wrote the structure:

image

Steps to Reproduce:

1) Create a console project in the .NET Framework 4.8. 2) set the project to x64. 3) Install the nuget packages. 4) Extract the SDK Ultralight 1.3.0 libraries to the project path. 5) Run the example: https://github.com/SupinePandora43/UltralightNet/blob/master/Examples/AppCore/UltralightNet.AppCore.TestApp/Program.cs

Error:

image

System.TypeLoadException: 'Cannot marshal field 'FileExists' of type 'UltralightNet.Platform.HighPerformance.ULFileSystem': There is no marshalling support for this type.'

If I am doing something wrong, please point me out.

SupinePandora43 commented 6 months ago

I've already fixed it more than 8 months ago. Though, as many other fixes/changes, it didn't get to nuget because I've not published it. I'll see what I can do, but for now, I can only recommend you to use UltralightNet directly from the develop branch. Please reply if something doesn't work, if you need help with getting UltralightNet to build locally, I recommend you to use the official Ultralight discord server with the #c-sharp channel for communication.

DestroyerDarkNess commented 6 months ago

I guess it was a type problem. I see you solved it, I'll try to build the develop branch. Thanks for answering.