unity 升级错误

PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Mono.Cecil.dll included for the current platform. Only one assembly with the same name is allowed per platform. Assembly path: {0}
UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.CreateTargetAssemblies (System.Collections.Generic.IEnumerable1[T] customScriptAssemblies, System.Collections.Generic.IEnumerable1[T] precompiledAssemblies) (at D:/unity/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:221)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.UpdateCustomTargetAssemblies () (at D:/unity/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:672)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.SetAllCustomScriptAssemblyJsonContents (System.String[] paths, System.String[] contents, System.String[] guids) (at D:/unity/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:892)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.SetAllCustomScriptAssemblyJsonContents (System.String[] allAssemblyJsonPaths, System.String[] allAssemblyJsonContents, System.String[] guids) (at D:/unity/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:241)

解决方案如下

1:打开packages manager ,在window->packages Manager。然后把能升级的package 都升级了。应该就解决了

如果找不到Packages Manager
2: (1) 打开项目目录下的 Logs->Packages-Update.log。 看看都更新了什么package。
(2) 打开项目目录下的Packages->manifest.json。 备份里面的内容,然后删除unity升级时加的package。
(3)重启unity,这个时候错误应该消失了。
(4)打开packages manager ,在window->packages Manager。然后把能升级的package 都升级了。
(5)把第二部删除的package添加回来
(6)重启unity

推荐阅读更多精彩内容

  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom阅读 2,101评论 0 3
  • UnauthorizedAccessException: Access to the path "E:\" is ...
    blinding_light阅读 3,062评论 0 0
  • http://huangyaoshi.me/2015/07/25/plugins-system-in-unity/...
    ysl176阅读 3,114评论 0 10
  • 本月收获点:因为信息看到的不及时,错过了美容品讲师的报名,本来有些失落,然后突然接到分公司的信息,问我怎么没有报名...
    元小君阅读 92评论 0 0
  • 观其变 通其理 洞其势 玩其占 天下不过囊中 天地无心 自古寿长 圣人无己 与世比肩
    虽不中不远矣阅读 113评论 0 0
  • start() : 它的作用是启动一个新线程。通过start()方法来启动的新线程,处于就绪(可运行)状态,并没有...
    snoweek阅读 11,132评论 1 13
  • 感赏自己即使下雨天也能坚持早起去学习课程! 感赏自己接纳儿子,虽然能量晃荡还是能够闭嘴! 感赏王丽老师讲授财富通道...
    幸福的玲宝宝阅读 137评论 0 1