Search Issue Tracker

Fixed in 5.5.0

Votes

0

Found in

5.5.0a5

Issue ID

823885

Regression

Yes

API Updater fails when upgrading project to Unity 5.5

Scripting

-

Download and import the package Inventory Pro from the Asset Store or try to open the attached project in Unity 5.5 or alternatively, import the attached project.

API Updater fails with this error and the project is unusable:
"APIUpdater encountered some issues and was not able to finish.


System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException (ExceptionResource resource) <0xa705ef0 + 0x0002f> in <filename unknown>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].Insert (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value, Boolean add) <0x2abc548 + 0x0015b> in <filename unknown>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value) <0x2ae9f38 + 0x00027> in <filename unknown>:0
at CSharpUpdater.NamespaceChanger.VisitUsingDeclaration (ICSharpCode.NRefactory.CSharp.UsingDeclaration usingDeclaration) <0xa6930f8 + 0x00039> in <filename unknown>:0
at ICSharpCode.NRefactory.CSharp.UsingDeclaration.AcceptVisitor (IAstVisitor visitor) <0xa6930b0 + 0x0001c> in <filename unknown>:0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) <0xa693070 + 0x0002b> in <filename unknown>:0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration) <0xa69cf98 + 0x0001a> in <filename unknown>:0
at CSharpUpdater.ReplacingAstVisitor.VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration) <0xa69ce10 + 0x00047> in <filename unknown>:0
at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor (IAstVisitor visitor) <0xa69cd78 + 0x0001c> in <filename unknown>:0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) <0xa693070 + 0x0002b> in <filename unknown>:0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) <0xa693050 + 0x0001a> in <filename unknown>:0
at CSharpUpdater.NamespaceChanger.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) <0xa692f18 + 0x00023> in <filename unknown>:0
at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor (IAstVisitor visitor) <0xa692e98 + 0x0001c> in <filename unknown>:0
at CSharpUpdater.CSharpUpdater.RunUpdater (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) <0x2b42968 + 0x0013e> in <filename unknown>:0
at APIUpdater.Framework.Core.APIUpdaterBase.Update (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) <0x2b427a0 + 0x0006b> in <filename unknown>:0
at ScriptUpdater.Program.UpdateLanguage (IScriptUpdater updater, APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.String unityDataPath, System.String outputPath) <0x2b31618 + 0x0020d> in <filename unknown>:0
at ScriptUpdater.Program.Main (System.String[] args) <0x2aa0f28 + 0x00223> in <filename unknown>:0

(Filename: Line: 0)"

Verified that the package imports and works fine in Unity 5.4.0f3. Fails in Unity 5.5.0a5.

Comments (2)

  1. Martian-Games

    Feb 20, 2021 22:39

    Still happens in 2019.4.14

  2. StarFluke

    Jan 08, 2017 02:28

    I had similar happen with the latest update to Rewired. (Dec 28th). Different stack so I assume different problem:
    APIUpdater encountered some issues and was not able to finish.


    System.InvalidCastException: Specified cast is not valid.
    at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit (Mono.CSharp.Method m) <0x2b8f090 + 0x0031c> in <filename unknown>:0
    at Mono.CSharp.Method.Accept (Mono.CSharp.StructuralVisitor visitor) <0x2b8f070 + 0x0001a> in <filename unknown>:0
    at Mono.CSharp.StructuralVisitor.VisitTypeDefinition (Mono.CSharp.TypeDefinition tc) <0x2b89988 + 0x0005b> in <filename unknown>:0
    at Mono.CSharp.StructuralVisitor.Visit (Mono.CSharp.Class c) <0x2b89960 + 0x00017> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit (Mono.CSharp.Class c) <0x2b88408 + 0x0055b> in <filename unknown>:0
    at Mono.CSharp.Class.Accept (Mono.CSharp.StructuralVisitor visitor) <0x2b883e8 + 0x0001a> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit (Mono.CSharp.ModuleContainer mc) <0x2b82a48 + 0x004fa> in <filename unknown>:0
    at Mono.CSharp.ModuleContainer.Accept (Mono.CSharp.StructuralVisitor visitor) <0x2b81920 + 0x0001a> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse (Mono.CSharp.CompilerCompilationUnit top, System.String fileName) <0x2b7ff30 + 0x000a8> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse (ITextSource program, System.String fileName, Int32 initialLine, Int32 initialColumn) <0x2b469c0 + 0x0031b> in <filename unknown>:0
    at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse (ITextSource program, System.String fileName) <0x2b46950 + 0x00043> in <filename unknown>:0
    at CSharpUpdater.Core.CSharpProjectHelper.SourceFilesDataFor (IEnumerable`1 sourceFiles, IEnumerable`1 defines, IAPIUpdaterListener logger) <0x2b44a98 + 0x0016b> in <filename unknown>:0
    at CSharpUpdater.CSharpUpdater.RunUpdater (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) <0x2b44680 + 0x0008f> in <filename unknown>:0
    at APIUpdater.Framework.Core.APIUpdaterBase.Update (APIUpdater.Framework.Core.SourceFile[] inputs, IEnumerable`1 defines, IEnumerable`1 references) <0x2b444b8 + 0x0006b> in <filename unknown>:0
    at ScriptUpdater.Program.UpdateLanguage (IScriptUpdater updater, APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.String unityDataPath, System.String outputPath) <0x2b32ce8 + 0x0020d> in <filename unknown>:0
    at ScriptUpdater.Program.Main (System.String[] args) <0x2aa0f28 + 0x00223> in <filename unknown>:0

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.