Search Issue Tracker
Won't Fix
Votes
6
Found in
2017.2.4f1
Issue ID
1108524
Regression
No
[General] Unclear error messages and script component issues when importing a project from Unity 2017.2
To reproduce:
1. Import user's attached project to any release 2017.4-2019.1
Expected: comprehensible error message appears, script components are not affected in any way
Actual: "InvalidOperationException" error appears, script component is shown as either "Nothing selected" or "(Script)"
Reproduced in: 2017.4,17f1. 2018.2.20f1, 2018.3.1f1, 2019.1.0a12
Note1: 2019.1 has more severe outcome. On defocusing and refocusing editor, a new behavior is introduced: clicking anywhere on editor forces recompilation to start and fail after short period of time. This makes editor unusable and impossible to quit by simple means.
Note2: script names are correct in 2018.3 and 20019.1
Note3: full console error:
InvalidOperationException: Sequence contains no matching element
System.Linq.Enumerable.Single[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) (at <389a581424f249b6bfedc5bb6d85fb6d>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScripts (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions options, UnityEditor.BuildTargetGroup platformGroup, UnityEditor.BuildTarget platform) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:632)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface+<CompileScripts>c__AnonStorey2.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:177)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.EmitExceptionAsError[T] (System.Func`1[TResult] func, T returnValue) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:75)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:CompileScripts(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget)
On 2019.1 there's also error:
Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)Copyright (C) Microsoft Corporation. All rights reserved.
-
arbmax1
Feb 09, 2020 06:16
Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
Copyright (C) Microsoft Corporation. All rights reserved.error CS2012: Cannot open 'C:\Users\sief\Documents\New Unity Project2\Temp\Unity.CollabProxy.Editor.dll' for writing -- 'Could not find file 'C:\Users\sief\Documents\New Unity Project2\Temp\Unity.CollabProxy.Editor.dll'.'
-
jamesc320
Jan 28, 2020 19:46
Ok I had this problem to. The solution is to update to Unity version 2019.3.0f6
-
GregoryFenn
Jan 07, 2020 17:51
I'm seeing the same "Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)Copyright (C) Microsoft Corporation. All rights reserved." error in 2019.2 and 2019.3 (the most up to date versions as of Jan 7th 2020). This has nothing to do with DevXUnityObfuscatorProU523 in general, as I've never heard of or installed or downloaded that.
-
andlline
Mar 21, 2019 16:20
Resolvi mudando para net.4x e compatibilidade net4x
-
evilcucaracha
Feb 23, 2019 21:19
I just had this issue, while using Unity 2018.3.6f1, I reverted to Unity 2018.3.4f1 and the compiler error went away. Hopefully they unbreak this on the next update.
-
vladibo
Feb 21, 2019 05:57
In my case the reason was that I was calling a method with multiple overloads and the compiler is confused what overload to use. Interesting that in Visual Studio I can compile it fine, also resharper was happy with in, it seems like Unity has older version of the Roslyn compiler that has an issue differentiating between very similar overloads. If you have same issue I would recommend you comment code until you find what part is causing it. Check for multiple overloads of a function.
-
ValrikRobot
Feb 07, 2019 15:25
same wats goin on? tried above doesnt fix anythin
-
John_Vella
Jan 27, 2019 15:28
Not sure if this helps, but I had the same issue, (2019.1.0a12 Personal) and I got rid of the error by changing:
The Scripting Runtime Version to .Net 4.x Equivalent
The Api Compatibility Level to .NET 4.xHope this helps.
-
akira32chen
Jan 24, 2019 15:18
I have the same problem about 2018 upgrade to 2019.
-
akira32chen
Jan 24, 2019 15:18
I have the same problem about 2018 upgrade to 2019.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- IndexOutOfRangeException and InvalidOperationException when clicking on the HTML log in the Console
- Warnings "Attempting to draw with missing bindings" are logged when opening the HDRP VFX Template Sample Scene
- Red spots appear when Blending Lighting Scenarios using Adaptive Probe Volumes
- [Windows] About Unity Window needs to be opened twice to adapt to resolution
- NullReferenceException and temporary graph corruption after entering playmode if output node connection was changed
Resolution Note (2019.3.X):
It was found that "DevXUnityObfuscatorProU523" tool is changing things up in Unity's compilation pipeline internal code through reflection. Since this tool is modifying Unity internal code that shouldn't be modified, we will won't fix this issue.