Open mrdelicate opened 3 weeks ago
The Solution Directory
option, as its name implies, contains the path to the directory that contains the solution file, not the path to the file itself. So it has no way of specifying the name of the solution file, which currently is always assumed to match the project name. There's a PR to add a new option to allow configuring the name of the solution file:
Normal project execution (F5) does not use the solution at all, we only care about the .csproj
file. When exporting we also only care about the .csproj
file, but we still have some checks for the .sln
file in some places. Some of these checks are left from Godot 3 where we used to use the .sln
file to build/export the C# project, nowadays we probably could remove them (or replace with checking the .csproj
instead).
The
Solution Directory
option, as its name implies, contains the path to the directory that contains the solution file, not the path to the file itself. So it has no way of specifying the name of the solution file, which currently is always assumed to match the project name. There's a PR to add a new option to allow configuring the name of the solution file:Normal project execution (F5) does not use the solution at all, we only care about the
.csproj
file. When exporting we also only care about the.csproj
file, but we still have some checks for the.sln
file in some places. Some of these checks are left from Godot 3 where we used to use the.sln
file to build/export the C# project, nowadays we probably could remove them (or replace with checking the.csproj
instead).
Ah I went and did the fix before reading this, but I think I handled it pretty gracefully without requiring any UI updates. Easy win.
Tested versions
Reproducible in: 4.3.stable.mono.official [77dcf97d8]
System information
Godot v4.3.stable.mono - Windows 10.0.22631 - Vulkan (Mobile) - dedicated Radeon RX 580 Series (Advanced Micro Devices, Inc.; 26.20.13002.133) - AMD Ryzen 5 2600 Six-Core Processor (12 Threads)
Issue description
During project export, Godot's .NET integration incorrectly constructs the solution file path for C# projects that exist as part of a larger solution. The export process appears to ignore the configured solution path and instead tries to find a solution file named after the assembly name, whereas normal project execution (F5) works correctly with the specified solution path.
The export process fails with the error:
The export process incorrectly:
Steps to reproduce
Workaround Steps
You can work around this issue by either:
Create a server-specific solution in the Godot project directory:
Or create a symbolic link in the Godot project directory:
Both workarounds are suboptimal as they:
Minimal reproduction project (MRP)
Not at the moment.