-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Mono (C#) Tuple support #34803
Comments
Did some more research but I'm at a loss. However this comment by Mr Zagaeski [MSFT] might be helpful: https://developercommunity.visualstudio.com/solutions/121139/view.html |
I got it working. it turns out I didn't follow the steps to install What I did (That did not work) was:
The problem is, This workflow WORKED:
Doing that, now Tuples are working in my project: public override void _Ready()
{
var tuple = (first: "hello", second: "godot!!!");
var (third, fourth) = ("goodbye", "godot");
GD.Print($"{tuple.first}, {tuple.second} .... {third} {fourth}");
} So maybe you can add some documentation telling people not to use EDIT: I submitted a pull request to update these docs. |
admins: feel free to close this, just please consider mentioning the proper workflow in docs (see the last paragraph of my last comment) Edit: (I submitted a pull request, as linked below) |
highlighting proper workflow as per my discovery here: godotengine/godot#34803 (comment)
Godot version:
v3.2-beta4_mono_win64
OS/device including version:
Win10 (PC) using VSCode
Issue description:
Mono 6.x is supposed to support the C# 7.0 Tuple types, but it doesn't work. VSCode shows errors and trying to run the scene in Godot also errors with identical error messages.
When I try to paste in the example from https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7#tuples
VSCode outputs errors:
I looked in my
Godot_v3.2-beta4_mono_win64\GodotSharp\Mono\lib\mono\4.5
folder and don't see aSystem.Runtime.CompilerServices.dll
so maybe that's it? (though there isSystem.Runtime.CompilerServices.Unsafe.dll
)I'm sorry but I'm new to Godot and Mono so not sure if this is something I could workaround on my end (install my own version of Mono?) or if there is another problem.
I tried installing the
System.ValueTuple
Nuget package (another error mentioned) but that didn't help.Steps to reproduce:
Minimal reproduction project:
if you need a project, let me know, but as it's more regarding Mono+VSCode+Project I think that wouldn't help much.
The text was updated successfully, but these errors were encountered: