Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

How to fix error that pops every time I open my project

Discussion in 'Scripting' started by raarc, Sep 17, 2020.

  1. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    307
    I recently unnistalled my old unity and now I can't quite remember which version I was on
    I remember i was on 2019.2.X I installed 2019.2.11 and had to upgrade the project, which leads me to believe I had an even older version. In any case everything works except this 1 error that pops up everytime i start unity.

    If someone knows how to just fix it it would save me some time trying to downgrade further along 2019.2.X until I find the correct one. ( Or is there a way to know which version my project is in? )
    ( If you can give me a solution to either how to fix it or how to know which version of unity I should download I would appreciate it. )

    Anyway here is the error:

    ArgumentException: Value does not fall within the expected range.
    SyntaxTree.VisualStudio.Unity.Bridge.CompilationUnit.LanguageOf (SyntaxTree.VisualStudio.Unity.Bridge.CompilationUnit unit) (at <46c1600e7cc74cd5bc97145420df9cc5>:0)
    SyntaxTree.VisualStudio.Unity.Bridge.CompilationUnit.CompilationUnits () (at <46c1600e7cc74cd5bc97145420df9cc5>:0)
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectSystem.UnitySolutionBuilder..ctor () (at <46c1600e7cc74cd5bc97145420df9cc5>:0)
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectSystem.UnitySolutionBuilder.CreateSolutionFromAssetDatabase () (at <46c1600e7cc74cd5bc97145420df9cc5>:0)
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator.GenerateProject () (at <46c1600e7cc74cd5bc97145420df9cc5>:0)
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilePostprocessor.OnPreGeneratingCSProjectFiles () (at <46c1600e7cc74cd5bc97145420df9cc5>:0)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <567df3e0919241ba98db88bec4c6696f>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <567df3e0919241ba98db88bec4c6696f>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <567df3e0919241ba98db88bec4c6696f>:0)
    UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:662)
    UnityEditor.AssetPostprocessingInternal.OnPreGeneratingCSProjectFiles () (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:221)
    UnityEditor.VisualStudioIntegration.SolutionSynchronizer.Sync () (at C:/buildslave/unity/build/Editor/Mono/VisualStudioIntegration/SolutionSynchronizer.cs:241)
    UnityEditor.SyncVS.SyncVisualStudioProjectIfItAlreadyExists () (at C:/buildslave/unity/build/Editor/Mono/SyncProject.cs:163)
     
  2. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    3,823
    The message you got on starting your project mentioned what version of Unity it had been using.
     
  3. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    5,511
    To access version number, you can also go into your projectSettings folder and open the ProjectVersion.txt file.

    As for your errors, they are all UnityEditor errors and should have no effect on your game. If you hit clear, they will go away.
     
  4. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    307
    THANKS it was 2019.2.10.f1
     
  5. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    307
    I reinstalled the correct version but the error still persists

    I know its just a visual but I would really like to fix this, everytime i get out of play mode the error pops
     
  6. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    3,823
    Make sure the packages you are using in your project are up to date or downgrade them to the version that fits your project.
     
  7. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    307
    i just have tilemaps 2d, analytics library, and of course package manager those 3

    Untitled.png
     
unityunity