Open hawkerm opened 1 year ago
I get the same error and had to go back to 0.2.3. I downloaded the source for 0.3.0, but I am not sure where it is getting Nodewrapper's get_RawNode from. NodeWrapper has a RawNode property in the class and interface. Is it a source generator thing, I can't find any generated source with that reference either.
Just tried this library and got the same thing, any luck diagnosing it? (I have barely used Godot so have no context as to what is blowing up or why).
Under the hood, C# used to (probably still does) compiles properties to a get and set so that other Common Language Model languages that might not support properties can access them.
Cloning the project after receiving the same error, I changed this line: internal readonly struct NodeWrapper : INodeWrapper
{
object INodeWrapper.RawNode => Node;
Note that since this is an internal struct, the change should be non-breaking to the public API. I think C# is optimizing out the property accessor because it's an internal struct and nothing references that property in the code - I think it's not picking up that the interface references it, because of typing in the routine where it's used. But that's a guess.
Describe the bug Tried updating to latest 0.3.0 and saw an issue from the Godot Debug window, if I downgrade the same code to 0.2.3 (and is the same code I had with 0.2.2) - it works fine.
To Reproduce Steps to reproduce the behavior:
<PackageReference Include="Godot.DependencyInjection" Version="0.2.3"/>
dependencyE 0:00:01:0026 :0 @ void Godot.DependencyInjection.DependencyInjectionManagerNode._EnterTree(): System.TypeLoadException: Method 'get_RawNode' in type 'Godot.DependencyInjection.NodeWrapper' from assembly 'Godot.DependencyInjection, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. <C++ Error> System.TypeLoadException <C++ Source> :0 @ void Godot.DependencyInjection.DependencyInjectionManagerNode._EnterTree()