Skip to content
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

.NET SDK 6.0 can't be used anymore to build C# solutions in a project #89386

Closed
Calinou opened this issue Mar 11, 2024 · 1 comment · Fixed by #91079
Closed

.NET SDK 6.0 can't be used anymore to build C# solutions in a project #89386

Calinou opened this issue Mar 11, 2024 · 1 comment · Fixed by #91079

Comments

@Calinou
Copy link
Member

Calinou commented Mar 11, 2024

Tested versions

System information

Godot v4.3.dev (f040a35) - Fedora Linux 39 (KDE Plasma) - Wayland - GLES3 (Compatibility) - NVIDIA GeForce RTX 4090 (nvidia; 545.29.06) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

Issue description

I've been trying to run https://github.com/godotengine/godot-benchmarks on the benchmarks server (which runs Fedora 39 just like my PC), but I'm getting an error:

  Determining projects to restore...
  Restored /home/godot/godot-benchmarks/godot/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Godot.SourceGenerators.Sample.csproj (in 82 ms).
  Restored /home/godot/godot-benchmarks/godot/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Godot.NET.Sdk.csproj (in 119 ms).
  Restored /home/godot/godot-benchmarks/godot/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/Godot.SourceGenerators.Tests.csproj (in 5.04 sec).
  3 of 6 projects are up-to-date for restore.
  Godot.NET.Sdk ->
  Godot.SourceGenerators -> /home/godot/godot-benchmarks/godot/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/bin/Release/netstandard2.0/Godot.SourceGenerators.dll
  Successfully created package '/home/godot/godot-benchmarks/godot/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/bin/Release/Godot.NET.Sdk.4.3.0-dev.nupkg'.
  Godot.SourceGenerators.Internal -> /home/godot/godot-benchmarks/godot/modules/mono/glue/GodotSharp/Godot.SourceGenerators.Internal/bin/Debug/netstandard2.0/Godot.SourceGenerators.Internal.dll
  GodotSharp -> /home/godot/godot-benchmarks/godot/modules/mono/glue/GodotSharp/GodotSharp/bin/Release/GodotSharp.dll
CSC : error CS1617: Invalid option '11' for /langversion. Use '/langversion:?' to list supported values. [/home/godot/godot-benchmarks/godot/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Godot.SourceGenerators.Sample.csproj]
CSC : error CS1617: Invalid option '11' for /langversion. Use '/langversion:?' to list supported values. [/home/godot/godot-benchmarks/godot/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/Godot.SourceGenerators.Tests.csproj]

I have dotnet-sdk-6.0 installed from the Fedora repositories on the server. On my system, I also have dotnet-sdk-7.0 and dotnet-sdk-8.0 installed and it works.

As far as I know, we still try to support .NET 6.0 as a baseline, so it should be possible to build solutions for desktop platforms without having to install a newer version.

According to @paulloz, this may be related to #86528. cc @avilches

Steps to reproduce

git clone --depth=1 https://github.com/godotengine/godot-benchmarks.git
cd godot-benchmarks
path/to/godot.binary --editor --build-solutions --quit-after 100

# If you want to run C# benchmarks to see whether the built solution works:
path/to/godot.binary -- --run-benchmarks --include-benchmarks="csharp/*"

Minimal reproduction project (MRP)

https://github.com/godotengine/godot-benchmarks

@Calinou Calinou added this to the 4.3 milestone Mar 11, 2024
@paulloz paulloz changed the title .NET 6.0 can't be used anymore to build C# solutions in a project .NET SDK 6.0 can't be used anymore to build C# solutions in a project Mar 11, 2024
@paulloz
Copy link
Member

paulloz commented Mar 15, 2024

We could go back to the previous langversion for the problematic projects (Godot.SourceGenerators.Tests and Godot.SourceGenerators.Sample), or simply say that we build with SDK 8 now (we've actually been building with that for some time now IINW). Keeping in mind that SDK 6 will be out of LTS in a few months anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants