+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...

asked Nov 3, 2017 in Engine by jvincek (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-5.4.1.6-x64-0 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:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48159

answered Nov 23, 2017 by mayotuna (48 points)
selected Nov 23, 2017 by jvincek

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

0 votes

Have you tried the following?

Editor > Editor Settings > Mono > Builds

Set Build Tool to MSBuild(System)

answered Nov 23, 2017 by Akrasia (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 How to use this Q&A? before posting your first questions.