Closed ShadowMarker789 closed 1 year ago
I had just recently upgraded my game project to .Net 6 since I wanted to use certain libraries that only work in .Net 6 - turns out the upgrade caused problems for NeoLua.
As it happens if you ignore those exceptions thrown everything continues to work but while it's busy throwing an exception for every assembly loaded we're eating a lot of overhead as a result from the exception unrolling and stack-trace.
Did some testing by cloning and modifying.
Pull request created: Bugfix Pull Request
I am unable to get this to compile under .NET 6. The line that includes "CompileToMethod" seems to not compile as that method does not exist. How did you solve that problem?
Nevermind, I see it, there was a missing conditional
NeoLua Version: 1.3.14 from NuGet - BUT ERROR ONLY IN .NET 6!
Example to reproduce: ( Lua code that interacts with your own custom classes )
Unfortunately Assembly.ReflectionOnlyLoad was obsoleted in .Net 6 as per Microsoft Documentation
As a result This Line of Code always throws an exception on this platform.
Could we perhaps get a platform or runtime check for .Net 6?