ImGui.NET
ImGui.NET copied to clipboard
Can I use this on a .NET Framework 4.7.2 project?
Not sure if it's related to that, but I keep getting this error when i try using any of the ImGui.NET's functions:
[Error] System.TypeLoadException: Could not find method due to a type load error
I was thinking maybe it's because I'm using .NET Framework 4.7.2, and ImGui.NET uses .NET Standard 2.0. What is the actual cause of this error?
.NET Standard 2.0 is compatible with .NET Framework 4.6.1 or superior by definition: https://docs.microsoft.com/en-us/dotnet/standard/net-standard
Hm. What could be causing my error then?
It is probably missing a DLL. Do you see the cimgui.dll and ImGui.Net.dll are copied to your output directory? The project definitely does work with .NET Framework 4.7.2. As the XNA example uses that exact version https://github.com/mellinoe/ImGui.NET/blob/master/src/ImGui.NET.SampleProgram.XNA/ImGui.NET.SampleProgram.XNA.csproj (and runs for me).
If all else fails you can use the fusion log viewer to determine what dll could not be loaded: https://docs.microsoft.com/en-us/dotnet/framework/tools/fuslogvw-exe-assembly-binding-log-viewer?redirectedfrom=MSDN. Maybe that gives you a hint?
Yeah, they're both copied to my output directory. I'm using MelonLoader btw to be able to use ImGui.NET in a .NET game. I'm not sure if that affects anything.