godotengine / godotengine/godot

Building with mono can't handle special characters in file path

Open
#97,232 0 comments 0 reactions 0 assignees View on GitHub
discussion enhancement topic:dotnet topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in v4.3.stable.mono.official [77dcf97d8] and v4.4.dev2.mono.official [97ef3c837]

### System information

Godot v4.3.stable.mono - Ubuntu 20.04.6 LTS (Focal Fossa) - X11 - OpenGL 3 (Compatibility) - Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2) - Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz (4 Threads)

### Issue description

When trying to compile a C# project using Godot Mono It fails and returns the error:

```
MSB4019: The imported project "/path/to/project/Zombie BurgerZ: Oh No Edition/.godot/mono/temp/obj/Zombie BurgerZ- Oh No Edition.csproj.*.props" was not found. Confirm that the expression in the Import declaration "/path/to/project/Zombie BurgerZ: Oh No Edition/.godot/mono/temp/obj/Zombie BurgerZ- Oh No Edition.csproj.*.props" is correct, and that the file exists on disk. /usr/share/dotnet/sdk/8.0.401/Current/Microsoft.Common.props(74,3)
```

Removing special characters from the project directory name and `assembly_name` (located in `project.godot`) fixes the issue.

My project was created in an older version of Godot where it didn't enforce having no special characters in project directory names. Godot should warn users when opening a project that has special characters in its name or warn users when migrating their projects that have special characters to newer versions.

### Steps to reproduce

- Create and import a project with special characters in the directory name (e.g `:`) using an older version of Godot
- Open the project in a newer version
- Create a C# script and try to compile

### Minimal reproduction project (MRP)

[minimal reproduction project](https://github.com/user-attachments/files/17074558/mvp.test.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.