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…

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.

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

Sorry no help from me, I have the same problem (have you solved it yet?)

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…

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.

heh restarted unity it went away

That pop up after I pull some changes from others dev and It was about API compability level under the Project - Player settings.

I changed API compability level to .NET Standart 2.1 and its fixed.