+4 votes

As specified in the title, I get this error while trying to run a C# project:

The specified task executable location "\csc.exe" is invalid.

Click to see error SS

This happens after fixing the error I previously had with reference assemblies.

I must admit I'm a bit confused. Isn't the point of Mono so that you don't need the "regular" .NET framework? Because to fix the first error I had to install the correct .NET SDK version and now the compiler "csc" can't be found. I have "csc.exe" in a bunch of locations, both in C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe (for multiple versions in this location), and in Mono itself: C:\Program Files (x86)\Mono\lib\mono\4.5

Which one is it looking for? Why can't it find it (godot/mono/toolchain, whichever is failing)?

I have both of these locations in the PATH env. var. but the file path in the error report (two backslashes with csc.exe) looks suspicious...

in Engine by (34 points)

Any update to this that you've found? I have the same problem, and came from the previous problem that you had involving the reference assemblies.

Sorry, I have yet to find the solution to this problem. I tried installing Godot on another machine and had the exact same situation (both the previous issue and this one). By the number of upvotes, it seems we're not alone :)

I have failed to figure out who/what has (or provides) the incorrect csc executable location ("\csc.exe"). Googling this seems to only reveal similar problems where "incorrect" csc either has a full path which gives further hints on how to proceed or as it turns out csc can sometimes be corrupted which is solved by reinstalling it.

But I haven't found this exact same problem or how to fix it.

As an update to this problem, I just tried installing Godot_v3.0-alpha2_mono_win64 and Mono- on an new machine with nothing installed on it related to .NET, Mono, or Godot, and the same prior problem with reference assemblies happened. I think there is either something missing that's assumed we should have/do in order to get this working, or there is something wrong with the Godot alpha2_mono binary that prevents it from correctly building a solution.

I'm not very knowledgeable on this topic, so I could definitely be missing something here.

Yes, pretty much my exact thoughts. The beta is supposed to arrive in a few days (it's stated in today's post about translations), so I'll wait for that to see if the problem is resolved. If not I'll try to reach out to someone from Godot team to see if someone can help.

2 Answers

+2 votes
Best answer

I had the same problem, but installing MSBuild 2015 fixed it for me:

by (48 points)
selected by

I can confirm that this also solved the problem for me. Hopefully no more problems creep up :)

0 votes

Have you tried the following?

Editor > Editor Settings > Mono > Builds

Set Build Tool to MSBuild(System)

by (14 points)

Tried it, didn't work. I've selected the answer that helped, but thanks for your answer.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.