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

Asset Importers

-

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.

  1. Response avatar

    Resolution Note (fix version 2019.3):

    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.

Comments (10)

  1. Ea7091e45b0db4a9fc81a545268c756f?d=mm

    andlline

    Mar 21, 2019 16:20

    Resolvi mudando para net.4x e compatibilidade net4x

  2. 7b31fa527bb7ce18513c5100a8f7b275?d=mm

    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.

  3. B822dbf0ddf6d3bc5caf39def71ef10c?d=mm

    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.

  4. 89cbc2e6dfacdf1f75c9070bc84971a6?d=mm

    ValrikRobot

    Feb 07, 2019 15:25

    same wats goin on? tried above doesnt fix anythin

  5. C1d5890fe116b31ac71d9733c1f3f438?d=mm

    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.x

    Hope this helps.

  6. 6487a948058f49bd003c418f4703406b?d=mm

    akira32chen

    Jan 24, 2019 15:18

    I have the same problem about 2018 upgrade to 2019.

  7. 6487a948058f49bd003c418f4703406b?d=mm

    akira32chen

    Jan 24, 2019 15:18

    I have the same problem about 2018 upgrade to 2019.

  8. 6929ee466622de338ffb39fe9bbafb2c?d=mm

    clj1973

    Jan 18, 2019 01:27

    I have the same issue after importing into 2018.3.2.f1

  9. A94652d25f35e285c0c9222556f988eb?d=mm

    carlos_m_orozco

    Jan 13, 2019 22:22

    i have the same issue

  10. A94652d25f35e285c0c9222556f988eb?d=mm

    carlos_m_orozco

    Jan 13, 2019 22:22

    i have the same issue

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.