LuaCSharp 0.5.5 (netstandard2.1 lib) fails to load in Unity with:
FileNotFoundException: Could not load file or assembly
'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Lua.Internal.LuaValueDictionary.set_Item (...)
Lua.LuaTable.set_Item (...)
Lua.LuaGlobalState..ctor (...)
Lua.LuaGlobalState.Create (...)
Lua.LuaState.Create ()
Environment:
- Unity 6000.3.21f1
- LuaCSharp installed via NuGetForUnity, netstandard2.1 lib picked up
(Assets/Packages/LuaCSharp.0.5.5/lib/netstandard2.1/Lua.dll)
- packages.config does not include System.Runtime.CompilerServices.Unsafe
by default; NuGetForUnity does not auto-resolve it
Repro:
- Install LuaCSharp 0.5.5 via NuGetForUnity in a Unity 6000.3.21f1 project
- var state = LuaState.Create();
- FileNotFoundException is thrown from LuaGlobalState's constructor
(LuaValueDictionary.set_Item)
Regression note:
this same project runs this exact LuaCSharp version
without issue on Unity 6000.3.12f1. The error first appeared immediately
after upgrading the editor to 6000.3.21f1, with no other relevant project
changes. I reverted the editor back to 6000.3.12f1 (same project, same
LuaCSharp install, no other changes) and confirmed the error does not
reproduce there — it is specific to 6000.3.21f1. This strongly suggests
the missing dependency was previously being masked by some implicit
assembly version unification in the 6000.3.12f1 Mono build that the
6000.3.21f1 build no longer performs.
LuaCSharp 0.5.5 (netstandard2.1 lib) fails to load in Unity with:
FileNotFoundException: Could not load file or assembly
'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Lua.Internal.LuaValueDictionary.set_Item (...)
Lua.LuaTable.set_Item (...)
Lua.LuaGlobalState..ctor (...)
Lua.LuaGlobalState.Create (...)
Lua.LuaState.Create ()
Environment:
(Assets/Packages/LuaCSharp.0.5.5/lib/netstandard2.1/Lua.dll)
by default; NuGetForUnity does not auto-resolve it
Repro:
(LuaValueDictionary.set_Item)
Regression note:
this same project runs this exact LuaCSharp version
without issue on Unity 6000.3.12f1. The error first appeared immediately
after upgrading the editor to 6000.3.21f1, with no other relevant project
changes. I reverted the editor back to 6000.3.12f1 (same project, same
LuaCSharp install, no other changes) and confirmed the error does not
reproduce there — it is specific to 6000.3.21f1. This strongly suggests
the missing dependency was previously being masked by some implicit
assembly version unification in the 6000.3.12f1 Mono build that the
6000.3.21f1 build no longer performs.