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 3.2 C#: failed to build project solution #36531

Closed
zwz opened this issue Feb 25, 2020 · 15 comments
Closed

Godot 3.2 C#: failed to build project solution #36531

zwz opened this issue Feb 25, 2020 · 15 comments

Comments

@zwz
Copy link

zwz commented Feb 25, 2020

Godot version:
Godot 3.2
OS/device including version:
macOS Mojave 10.14.5
Issue description:
When I click to build/run, a build error modal pops up, saying: failed to build project solution.
Steps to reproduce:
I cannot remember the steps, but here is what I did in general:

  1. add some builtin meshes
  2. playing around spatial and shader materials (during the process, it builds successfully)
  3. add a C# script for some object (the script file name is in Chinese, no editing at all)
  4. the issue comes
  5. delete the script, the issue remains
    Minimal reproduction project:
    Godot.zip
@andy-noisyduck
Copy link
Contributor

I'm not entirely sure how you got your project into the state, but the csproj references wall.cs which isn't included in your source. This is probably why it isn't compiling for you.

@zwz
Copy link
Author

zwz commented Feb 26, 2020

As I said,
I created a script (the script file name is in Chinese, no editing at all; and then I rename it in wall.cs)
And then I deleted the script.

All those operations(rename and delete) are done in Godot.

@andy-noisyduck
Copy link
Contributor

If you did a file rename then it's likely a duplicate of #12917.

I'm afraid Godot is still a little buggy when keeping csproj files in sync. I end up editing them manually when I've done a file rename.

@zwz
Copy link
Author

zwz commented Feb 26, 2020

I see.
But now I removed those references of cs script from csproj file (by an external editor), it still did not build.

@aaronfranke
Copy link
Member

Does any C# project work on your system, such as the demo projects? Do you have Mono installed?

@zwz
Copy link
Author

zwz commented Feb 26, 2020

@aaronfranke I just installed godot_mono.

@akien-mga
Copy link
Member

What is the actual build error? It should be shown in the debugger when you over the "callback failed" message.

If it refers to missing .NET Framework 4.7, be sure to install that.

@aaronfranke
Copy link
Member

If it refers to missing .NET Framework 4.7, be sure to install that.

Well, they're on Mac, so I doubt they could install a Windows-only library.

@akien-mga
Copy link
Member

akien-mga commented Feb 26, 2020

¯\_(ツ)_/¯
.NET ecosystem naming is a mess.

@zwz
Copy link
Author

zwz commented Feb 28, 2020

@akien-mga No, there is no useful message.
Installing mono solves the issue.
I thought godot_mono contains mono by itself.
So maybe there should be a note for godot_mono on the downloading page.

@aaronfranke
Copy link
Member

@zwz There is a note:

Screenshot from 2020-02-28 14-54-24

However, you are not the only person who has had this issue. I help several people each week on Discord set up Godot with Mono, and the issue is usually because they don't have Mono installed, or they are using and outdated version of Mono. @akien-mga Please check your Discord DMs, this needs to be made more obvious somehow, far too many people are missing the requirements.

@zwz
Copy link
Author

zwz commented Mar 3, 2020

Maybe still an issue.
After I removed all the c# scripts (and references from csproj file by an external editor), it should build. Shouldn't it?

@aaronfranke
Copy link
Member

aaronfranke commented Mar 3, 2020

@zwz The minimal reproduction project you posted does contain entries in the csproj file. I removed them and it works fine on my system. If you are having issues with those entries removed, please post a new/updated reproduction project.

Also, I highly recommend that you use ASCII characters for file names. Your project didn't unzip properly on my system since it changed 地面.tscn into å�°é�¢.tscn. If you are making a game in another language, consider leaving all of the files and code in ASCII characters and then just having the in-game text in that language.

@zwz
Copy link
Author

zwz commented Mar 5, 2020

Thank you for your file naming suggestion.

What I mean is that after I remove all the references from csproj file, it should build even if mono sdk is not installed, right?

@aaronfranke
Copy link
Member

If you are using the Mono version of Godot, and the project has a C# solution generated, then you need to have Mono/etc installed in order for it to run. This is expected behavior.

If you don't wish to use C# in your project, you can either delete all of the C# files, or open the project with a non-Mono version of Godot, which will ignore the C# solution file. Really, if you don't wish to have Mono/etc installed, you should just use the non-Mono version since it doesn't require Mono.

I will close this since it's not a Godot bug. It is possible that some things can be made clearer, like on the website, but the Godot developers are already aware of this kind of thing and there's not really any specific actionable proposals listed here.

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

4 participants