Best Guy Ever
Best Guy Ever

Reputation: 41

Microsoft C# Compiler error with no error description

I pretty new to Unity (I started today) and anytime I open a project I get a compiler error

Microsoft (R) Visual C# Compiler version 3.5.0-dev-20359-01 (8da8ba0c)
Copyright (C) Microsoft Corporation. All rights reserved.

In my project. Every time I open my project it asks me to take me to safe mode and there (in the safe mode) there are two error in the photo below

Error Image

I searched the web but everyone having this error had a tip or description telling them what might be wrong, but I didn't got that.

I have created no C# scripts in my projects. I also tried deleting the library folder but it didn't work. Also the error has only the description given in the photo. I am using Unity Editor Version 2020.3.20f1

Also is there a C# compiler which I need to install like we do in Java and C++, because if that's the case I have not installed any C# compiler in my system.

If anyone could even tell me the meaning of this error I will be grateful

Edit #1

I have realized that the latest .NET Framework is already in my system, so there is no case of .NET framework not installed

Edit #2

I checked my compiler settings and these are the configurations (The API Compatibility Level was set to .NET Standard 2.0 I changed it to .NET 4.x)

Compiler Settings

But when built the project, I got the following errors which could describe more of my situation (Note : The errors were same in the case of .NET Standard 2.0 and .NET 4.x)

NEW ERROR - 1 NEW ERROR - 1 NEW ERROR - 1

The

Microsoft (R) Visual C# Compiler version 3.5.0-dev-20359-01 (8da8ba0c)
Copyright (C) Microsoft Corporation. All rights reserved.

error has the same description after everything.

Thank you.

Upvotes: 2

Views: 2027

Answers (1)

varunkaustubh
varunkaustubh

Reputation: 351

Assuming you installed Visual studio through the Unity Hub, everything needed for Unity development should be installed correctly with nothing else to be done. My experience with this error is usually when i import an external package/ any dll into Unity, with the editor open. The error gets thrown immediately and a simple editor restart usually fixes it. If you haven't done this, I'd recommend you try 2 things:

  1. Go to Build Settings -> Player Settings -> Other Settings and look at your compiler and .NET version settings.

  2. Check your package manager to see if any packages are installed that may be causing the issue. Unity 2020+ generally installs some extra packages by default (like Unity Collab, etc), although this is unlikely to cause this problem

Upvotes: 1

Related Questions