- Home /
Upgrading project from Unity 5 to 2017+ gives error "System.Action defined multiple times".
Hi,
I am trying to migrate a big 3 year long project with lots of plugins, scripts and images from Unity 5 to Unity 2017/2018.
The project compiles fine in many versions of Unity 5, but it is not happy with any newer version. When I open the project in any version of 2017+ I get an error saying The imported type 'System.Action' is defined multiple times
.
The error is not consistently in one place. It seems to be almost any use of system.action in the code and every version of 2017+ picks up on a different line in a different script.
The 2018 beta even picks up on a line in the library files....
/Users/XXX/Library/Unity/cache/packages/packages.unity.com/com.unity.package-manager-ui@1.8.2/Editor/Sources/Services/Interfaces/IBaseOperation.cs(8,15): error CS0433: The imported type System.Action is defined multiple times
The best i could find when searching for solutions is people talking about "v4.0 mscorlib.dll" and "v2.0 System.core.dll" colliding. But this is a bit outside my knowledge base. Is this to do with changing the script runtime version? I have tried setting that to ".net 4.x" but to no avail!
Any help on this matter would be much appreciated. I feel like I'm missing something obvious.
Answer by JonBPS · Apr 26, 2018 at 12:13 PM
It turns out it was the GooglePlayServices plugin that was causing issues. Not sure why, but removing the old version we had and updating it to the latest (v0.9.5) fixed the type system.action being called out as a conflict at every instance.
Your answer
Follow this Question
Related Questions
Asset store Crash how do I fix ? 1 Answer
How do i fix this? 0 Answers
[Solved] Bug with disabling Polygon Collider 2D 0 Answers
Bugs in a pick up script 1 Answer
Unity C# code not register, other PC can 0 Answers