Been developing my project on Windows 10 for a long time with no major issues. Then out of nowhere this week it starts, now every time I open my project there are two blank errors at the console that I cannot clear (see image below).
I’m running Unity 2019.2.14f1, and also tried going back to 2019.2.13f1 and 2019.2.12f1 but the problem persists.
I use git source control, so even if I roll back a few days to a commit where I’m sure all was working fine, the same error persists.
Tried removing Unity and reinstalling, didn’t help.
Removed the ‘Library’ and did a clean import, didn’t make any difference either.
Error in the editor log says:
-----CompilerOutput:-stdout--exitcode: 9009--compilationhadfailure: True--outfile: Temp/UnityEngine.UI.dll
-----CompilerOutput:-stderr----------
'"D:\Programs\Unity-IDE\2019.2.14f1\Editor\Data\Tools\RoslynScripts\..\..\Tools\Roslyn\csc"' is not recognized as an internal or external command,
operable program or batch file.
-----EndCompilerOutput---------------
- Finished compile Library/ScriptAssemblies/UnityEngine.UI.dll
If I copy the path to a command windows it works just fine, and finds the csc.exe OK.
So at the moment I’m completely stuck, cannot do anything until I get this resolved.
I uninstalled unity hub and started the editor from the windows shell, and the problem disappeared for me too. It seems a bug with the hub, and I wasn’t aware of it because I updated unity and the hub together.
Wow - second time I opened my project after reinstalling Unity Hub the error came back again, however only one this time. I have a feeling that would not be the end of it though…
I’ve removed Unity Hub for now and am opening my project in Unity from the command line / directly, lost too much time to this issue already.
Thanks for response – did you actually read my full post and responses before replying?
“If I copy the path to a command windows it works just fine, and finds the csc.exe OK.”
“Uninstalled Unity Hub and launched my project in Unity from the command line / directly, the errors are gone!”
“Now reinstalled Unity Hub again and it’s working… that’s pretty messed up, but I’m not complaining.”
“Wow - second time I opened my project after reinstalling Unity Hub the error came back again, however only one this time. I have a feeling that would not be the end of it though…”
So at the moment if I install Unity Hub and try to launch from that, the issue comes back. If I launch the project directly without Unity Hub it works (every time).
I encountered exactly the same issue.
Thanks for this post for saving my day!
I was using UnityHub 2.1.3 at the first place,
and when I clicked the “upgrade” button on the footer bar in UnityHub,
I have two versions of UnityHub(2.1.3 and 2.2.0) installed at the same time.
And when I open my project by Unity2019.2.2f1, I got the same blank errors.
Just like what WildStyle69 said, uninstalling UnityHub get those errors fixed.
Just a mini update - after fixing the issue, I was working on my project again and suddenly the issue re-appeared! Some extra information - when I go to add or remove programs I see two Unity Hub versions there - but I can only uninstall one. Not sure if that has any relevance but it seems the issue will come back after some time.
I received the same error again after a simple git revert, and even restarting unity didn’t make them disappear.
Uninstalled hub again and now all works again.
Same here - I’ve been getting the same error since updating the Hub, and when I check, the file does exist. Uninstalling and reinstalling the Hub didn’t help, but downloading a version of the Unity Editor without the Hub does.
Sorry for the inconvenience. I am wondering if anyone can report the bug using the hub bug reporter, then we can see why this issue is happening by looking into the editor and hub logs.
I’ve also encountered this error, and spent days figuring out what was wrong.
This is the solution that worked for me without uninstalling or doing funky stuff with the Unity Hub.
Go to this path: “:\Program Files\Unity\2019.2.13f1\Editor\Data\Tools\RoslynScripts”
Open the batch file inside with notepad.
From there find the string similar to this: “%APPLICATION_CONTENTS%\Tools\Roslyn\csc”
Started to encounter the same problem yesterday immediately after updating the Unity Hub. Blank errors even on brand new projects with “C:\Program Files.…\Tools\Roslyn\csc” not being recognized in the Unity Editor.log file. Ended up fully reinstalling VS2017, Unity Hub (2.2.1), and Unity (2019.2.0b7, 2019.2.14f1) and still kept encountering the same problem.
Ultimately wateeeeeeeer’s solution seems to have worked for me.