我已升级到最新的 Unity 版本 (Unity 2019.3.0a7),但在不同的文件中却遇到了大量错误。
与我合作的朋友也运行相同的版本,但没有出现错误。
其中有两个,每个引用不同的包,但都引用每个包内的多个错误。
错误大致如下:
(R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
Copyright (C) Microsoft Corporation. All rights reserved.
error CS1504: Source file 'D:\[...]\[UnityProject]\Library\PackageCache\[email protected] /cdn-cgi/l/email-protection\UnityEngine.TestRunner\NUnitExtensions\Commands\BeforeAfterTestCommandState.cs' could not be opened -- The type initializer for 'Microsoft.CodeAnalysis.Text.EncodedStringText' threw an exception.
And
Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
Copyright (C) Microsoft Corporation. All rights reserved.
error CS1504: Source file 'C:\Program Files\Unity\Hub\Editor\2019.3.0a7\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\UIBehaviour.cs' could not be opened -- The type initializer for 'Microsoft.CodeAnalysis.Text.EncodedStringText' threw an exception.
控制台中的相应错误日志中报告了大约 15-20 个此类错误,但所有错误都说有关引发异常的相同内容(相同的错误代码)。
我以前从未见过此错误,并且在网上找不到任何帮助。我的所有软件包都是最新的。我不知所措。
我真的很感激任何关于如何解决这个问题的建议。
由于 Windows 注册表中残留工件,卸载 Anaconda 和 Python 可能会导致此类问题。
就我而言,删除注册表编辑器中的以下键有效:
计算机\HKEY_CURRENT_USER\Software\Microsoft\Command
处理器\自动运行
它的目标是在 Anaconda 卸载过程中删除的文件。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)