-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CS9077 and CS8350 errors in auto generated godot files #1
Comments
I was able to get past this by adding this stuff to my csproj:
Not sure which one fixed it (probably the avalonia one?), but the project builds. The designer still won't work. It's looking in the wrong directory for the dll (the .godot folder instead of the actual bin). Still trying to figure that one out. It happens in my project and the sample projects. |
Thanks for the report, it's Estragonia targets C# 11, which has a breaking change regarding ref structs escape analysis. Projects targeting C# 10 (which is the default for net6.0 projects generated by Godot) are unable to call the method. I'll change the target language level used by the library to C# 10 for now, as C# 11 isn't really needed. With this change, consuming projects can be either C# 10 or 11 and it'll work. Regarding the previewer, which IDE are you using with which plugin? I just tested:
Same thing with Rider with AvaloniaRider. Note that the Godot SDK sets the project output path to Would you mind opening another issue or discussion regarding the previewer to keep it separate from the C# errors? |
Fixed in 1.0.1: please update if you don't want to have to target C# 11. |
Not sure what i'm missing from the tutorial. I've gone through it several times, but my project won't build.
Error CS8350 This combination of arguments to 'AvaloniaControl.InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)' is disallowed because it may expose variables referenced by parameter 'method' outside of their declaration scope GREM Godot.SourceGenerators\Godot.SourceGenerators.ScriptMethodsGenerator\Grem.Scenes.UserInterface_ScriptMethods.generated.cs 33 Active
Error CS9077 Cannot return a parameter by reference 'method' through a ref parameter; it can only be returned in a return statement GREM Godot.SourceGenerators\Godot.SourceGenerators.ScriptMethodsGenerator\Grem.Scenes.UserInterface_ScriptMethods.generated.cs 33 Active
The auto generated code in question is:
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret) { if (method == MethodName._Ready && args.Count == 0) { _Ready(); ret = default; return true; } if (method == MethodName._Process && args.Count == 1) { _Process(global::Godot.NativeInterop.VariantUtils.ConvertTo<double>(args[0])); ret = default; return true; } **return base.InvokeGodotClassMethod(method, args, out ret);** }
Any idea on where to start fixing this?
The text was updated successfully, but these errors were encountered: