Microsoft (R) Visual C# Compiler version errors
So, my journey with Unity started from version 2018.4.32f1. I earned there some experience and after few months, I decided to move to version like 2019 or 2020. Firstly I installed version 2019.4.8f1. I created new project, run it and first thing I got is this compiler error:
Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation. All rights reserved.
And I thought - "It's okay I'll then install version 2020.3.1f1". So I installed this version and then I got this similar error:
Microsoft (R) Visual C# Compiler version 3.5.0-dev-20359-01 (8da8ba0c) Copyright (C) Microsoft Corporation. All rights reserved.
I don't know what to do. I don't want to start my "gamedev career" on old version of Unity. I would be really grateful if someone could help me solve it. Please...
Restart Unity to make sure this error is a persistent one (you would be surprised).
(re) Install Visual Studio (free version) with it's c# libraries.
Ok, so here is some update. I unistalled the unity and visual studio. After this I also deleted every unity related file that left on my computer I could. Then I installed unity and visual studio again. Errors that I mentioned disappeared but another problem have occured. Now it says only "The system cannot find the file specified" so...what's now?
The system cannot find the file specified
This sounds like something wrong with the operating system configuration. Maybe environment variables or user access setup is messed up (some windows updates are known to mess this up in rare cases).
Sorry no help from me, I have the same problem (have you solved it yet?)
Not really, and it irritates me beacuse I want to create but I can't! I decided to reinstall whole system in desperation. If it won't work I will change to unreal engine or something else. But I wouldn't like to beacuse.... I have already get used to this engine :(
Uninstalling Anaconda and Python can result in such issues because of remaining artifacts in the Windows registry.
In my case, removing the following key in Registry Editor worked :
Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
It was targeting a file removed in the Anaconda uninstall process.
Answer by MS_ANNOTATION_X_Collab · Apr 11, 2021 at 06:28 AM
When I got that error, I fixed it by:
Changing any of my scripts' folder/moving it away from the folder that's in
And then returning it to its original folder. If the issue didn't go away, I repeated the same thing that fixed the error.
Answer by GameDeveloperAf · May 01, 2021 at 10:05 AM
Not need to change the script's folder. Just type something in the script and save it then undo your type and then save it again. That's all
Answer by Kacper_Wojtyra · Apr 02, 2021 at 09:19 PM
Ok, so formatting disc C: and reinstalling whole system seams to solved the problem. I still don't know what exactly was wrong but...if it works then don't touch it ¯_(ツ)_/¯. I hope that it won't happen again...
Answer by hseeda · Dec 21, 2021 at 07:57 AM
Solution is there: https://stackoverflow.com/questions/56913616/unity-2019-3-0a7-microsoft-visual-c-sharp-compiler-errors
Uninstalling Anaconda and Python can result in such issues because of remaining artifacts in the Windows registry.
In my case, removing the following key in Registry Editor worked :
Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
It was targeting a file removed in the Anaconda uninstall process.
You saved my day. Thank you very much. It sounds crazy but it really worked!
Your answer
Follow this Question
Related Questions
how do i fix all compiler errors so i can enter playmode? 4 Answers
Array index is out of range. 1 Answer
not all code paths return a value? 1 Answer
Errors in code 2 Answers
parsing error 1 Answer