Support Forum

Namespace Errors when Upgrading to 4.3.40 Pro

Errors when upgrading to 4.3.40

I’m trying to upgrade from 4.2.15 pro version to 4.3.40 pro version as I require tags to work with modifiers. I’m running Unity3D 2019.3.0f6 on a Linux system.
To upgrade, I’m following these instructions:

https://www.arongranberg.com/astar/download_upm#

I made sure these packages are installed: Burst, Mathematics, Entities, Collections, Jobs and Unity UI. I deleted the 4.2.15 package before installing 4.3.40.

Everything goes ok, but at the end of the upgrade the following errors show up:

Library/PackageCache/com.arongranberg.astar@4.3.40/PackageTools/VersionedMonoBehaviour.cs(19,2): error CS0246: The type or namespace name ‘Drawing’ could not be found (are you missing a using directive or an assembly reference?)

Library/PackageCache/com.unity.collections@0.7.0-preview.2/Unity.Collections/CollectionHelper.cs(9,19): error CS0234: The type or namespace name ‘CompilerServices’ does not exist in the namespace ‘Unity.Burst’ (are you missing an assembly reference?)

Library/PackageCache/com.unity.collections@0.7.0-preview.2/Unity.Collections/NativeList.cs(8,19): error CS0234: The type or namespace name ‘CompilerServices’ does not exist in the namespace ‘Unity.Burst’ (are you missing an assembly reference?)

Library/PackageCache/com.unity.collections@0.7.0-preview.2/Unity.Collections/CollectionHelper.cs(172,18): error CS0246: The type or namespace name ‘AssumeRangeAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Library/PackageCache/com.unity.collections@0.7.0-preview.2/Unity.Collections/CollectionHelper.cs(172,18): error CS0246: The type or namespace name ‘AssumeRange’ could not be found (are you missing a using directive or an assembly reference?)

InvalidCastException: Specified cast is not valid.
ICSharpCode.NRefactory.Parser.CSharp.Parser.PointerMemberAccess (ICSharpCode.NRefactory.Ast.Expression& expr, ICSharpCode.NRefactory.Ast.Expression target) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.PrimaryExpr (ICSharpCode.NRefactory.Ast.Expression& pexpr) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.UnaryExpr (ICSharpCode.NRefactory.Ast.Expression& uExpr) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.Expr (ICSharpCode.NRefactory.Ast.Expression& expr) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.StatementExpr (ICSharpCode.NRefactory.Ast.Statement& stmt) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.EmbeddedStatement (ICSharpCode.NRefactory.Ast.Statement& statement) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.Statement () (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.Block (ICSharpCode.NRefactory.Ast.Statement& stmt) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.SetAccessorDecl (ICSharpCode.NRefactory.Ast.PropertySetRegion& setBlock, System.Collections.Generic.List1[T] attributes) (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) ICSharpCode.NRefactory.Parser.CSharp.Parser.AccessorDecls (ICSharpCode.NRefactory.Ast.PropertyGetRegion& getBlock, ICSharpCode.NRefactory.Ast.PropertySetRegion& setBlock) (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) ICSharpCode.NRefactory.Parser.CSharp.Parser.StructMemberDecl (ICSharpCode.NRefactory.Parser.ModifierList m, System.Collections.Generic.List1[T] attributes) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.StructBody () (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.TypeDecl (ICSharpCode.NRefactory.Parser.ModifierList m, System.Collections.Generic.List1[T] attributes) (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) ICSharpCode.NRefactory.Parser.CSharp.Parser.NamespaceMemberDecl () (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) ICSharpCode.NRefactory.Parser.CSharp.Parser.NamespaceMemberDecl () (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) ICSharpCode.NRefactory.Parser.CSharp.Parser.CS () (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) ICSharpCode.NRefactory.Parser.CSharp.Parser.ParseRoot () (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) ICSharpCode.NRefactory.Parser.CSharp.Parser.Parse () (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) UnityEditor.Scripting.Compilers.APIUpdaterHelper.FindTypeMatchingMovedTypeBasedOnNamespaceFromError (System.Collections.Generic.IEnumerable1[T] lines) (at /home/builduser/buildslave/unity/build/Editor/Mono/Scripting/Compilers/APIUpdaterHelper.cs:318)
UnityEditor.Scripting.Compilers.APIUpdaterHelper.IsReferenceToTypeWithChangedName

API Updater: Exception checking type 'EntityName=Unity.Burst.CompilerServices
Script=Library/PackageCache/com.unity.collections@0.7.0-preview.2/Unity.Collections/NativeList.cs
Line=8
Column=19’InvalidCastException: Specified cast is not valid.
ICSharpCode.NRefactory.Parser.CSharp.Parser.PointerMemberAccess (ICSharpCode.NRefactory.Ast.Expression& expr, ICSharpCode.NRefactory.Ast.Expression target) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.PrimaryExpr (ICSharpCode.NRefactory.Ast.Expression& pexpr) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.UnaryExpr (ICSharpCode.NRefactory.Ast.Expression& uExpr) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.Expr (ICSharpCode.NRefactory.Ast.Expression& expr) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.StatementExpr (ICSharpCode.NRefactory.Ast.Statement& stmt) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.EmbeddedStatement (ICSharpCode.NRefactory.Ast.Statement& statement) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.Statement () (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.Block (ICSharpCode.NRefactory.Ast.Statement& stmt) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.SetAccessorDecl (ICSharpCode.NRefactory.Ast.PropertySetRegion& setBlock, System.Collections.Generic.List1[T] attributes) (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) ICSharpCode.NRefactory.Parser.CSharp.Parser.AccessorDecls (ICSharpCode.NRefactory.Ast.PropertyGetRegion& getBlock, ICSharpCode.NRefactory.Ast.PropertySetRegion& setBlock) (at <d28bf961ce7c480eaa13bfa1b3f70a32>:0) ICSharpCode.NRefactory.Parser.CSharp.Parser.StructMemberDecl (ICSharpCode.NRefactory.Parser.ModifierList m, System.Collections.Generic.List1[T] attributes) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.StructBody () (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.TypeDecl (ICSharpCode.NRefactory.Parser.ModifierList m, System.Collections.Generic.List`1[T] attributes) (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.NamespaceMemberDecl () (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.NamespaceMemberDecl () (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.CS () (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.ParseRoot () (at :0)
ICSharpCode.NRefactory.Parser.CSharp.Parser.Parse () (at :0)
UnityEditor.Scripting.Compilers.APIUpdaterHelper.FindTypeMatchingMovedTypeBase

I found these related threads, but none of the solutions work in my case:

https://forum.arongranberg.com/t/bunch-of-errors-when-importing-beta-version-into-2019-3-0b11-followed-guide/7492https://forum.arongranberg.com/t/bunch-of-errors-when-importing-beta-version-into-2019-3-0b11-followed-guide/7492

Thank you for your help

Hi

It looks like something else in your project is causing the burst package to not be imported properly. I would try upgrading your unity version.