How do I build the GodotSharp project once the mono glue has been generated?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mighty_monarch

I am following the instructions for building Godot with Mono. I am attempting to build using Ubuntu (running on Windows subsystem for Linux) and currently also targeting linuxbsd in the build system. I am building from head, and the current version (in successful non-mono builds) is v4.0.dev.custom_build [0d5c0622d]. I successfully generated the mono glue, but when I try to run the command scons p=linuxbsd tools=yes target=release_debug module_mono_enabled=yes I get the following errors when building the GodotSharp .sln file:

  Core/Extensions/PackedSceneExtensions.cs(13,31): error CS0411: The type arguments for method 'PackedScene.Instance<T>(PackedScene.GenEditState)' cannot be inferred from the usage. Try specifying the type arguments explicitly. [/mnt/d/Godot/godot/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj]
  Core/Extensions/PackedSceneExtensions.cs(24,20): error CS0411: The type arguments for method 'PackedScene.Instance<T>(PackedScene.GenEditState)' cannot be inferred from the usage. Try specifying the type arguments explicitly. [/mnt/d/Godot/godot/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj]

The referenced code seems fine to me, so I think maybe something’s wrong with the version of mono installed (6.12.0.122), the version of msbuild (16.6.0.15201), or maybe the version of the C# language it’s trying to use (not sure how to check that.)

Does anyone have any advice for completing this last step of the build?