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

Godot Editor crashes build/run when .csproj is properly placed in subdir #42741

Closed
FyiurAmron opened this issue Oct 12, 2020 · 2 comments
Closed

Comments

@FyiurAmron
Copy link

Godot version:
3.2.3-stable_mono_win64

OS/device including version:
Windows 7

Issue description:
Trying to use .csproj placed in a subdir (with proper .sln path provided) causes a following error in Godot Editor (e.g. Rider works OK)

modules/mono/mono_gd/gd_mono_utils.cpp:371 - Microsoft.Build.Exceptions.InvalidProjectFileException: The project file could not be loaded. Could not find file "C:\xxx\projectName\projectName.csproj"  C:\xxx\projectName\projectName.csproj
 editor/editor_node.cpp:5408 - An EditorPlugin build callback failed.

Worth to note is that this setup (.csproj in a subdir) is, AFAIK, completely valid and normal for C# projects, even if not used that often in the wild. Also, the path shown in the error does not correspond to path that should be generated based on .sln data.

Steps to reproduce:

  1. create a new C#-ish Godot project
  2. move the .csproj to any subdir, updating .sln to point at it properly
  3. test under e.g. Rider (works OK - compiles/builds, runs etc.)
  4. test under Godot (crashes with the above error message)

Minimal reproduction project:
CsprojNotFound.zip

@Calinou
Copy link
Member

Calinou commented Oct 12, 2020

Worth to note is that this setup (.csproj in a subdir) is, AFAIK, completely valid and normal for C# projects, even if not used that often in the wild. Also, the path shown in the error does not correspond to path that should be generated based on .sln data.

Moving the .csproj file to a subfolder isn't supported in Godot yet. See godotengine/godot-proposals#1575.

We should still fix the crash and try to display an error message.

@FyiurAmron
Copy link
Author

FyiurAmron commented Oct 15, 2022

Since this feature was included both in 3.5.x, 3.6.x & 4.0.x (as it's a part of #64089), I'm closing this one. It behaves as expected now.

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

No branches or pull requests

3 participants