gpt4 book ai didi

c# - Unity3d 错误 CS2011 : Error opening response file (incorrect temp folder)

转载 作者:行者123 更新时间:2023-12-02 10:57:42 25 4
gpt4 key购买 nike

我需要你的帮助。 (已经发布在 here 没有帮助)

我刚刚在“C:\Program Files\Unity\Hub\Editor\2019.1.5f1\”的第二台计算机上安装了 Unity,启动 Unity 后直接出现 5 个错误,既不能编译任何东西,也不能进入 Unity 播放模式。在我的第一台计算机上,这些错误不存在。无论是空白项目还是拥有大量 Assets 的项目都没有关系。两台计算机都在装有 Visual Studio Professional 2017 的 64 位 Windows 10 上运行。到目前为止,重新安装 Unity 和 Visual Studio 并没有帮助。

图片:有错误的 Unity 控制台



我已经阅读了许多其他有关“打开响应文件时出错”的类似问题的帖子,但它们大多指的是带有写保护的符号链接(symbolic link)或路径。我的问题似乎有所不同,编辑器位于“C:\Program Files\Unity\Hub\Editor\2019.1.5f1\”,项目位于“C:\Projekte\New Unity Project\”。更改项目路径并不重要。我已经尝试了 3 个不同的驱动器位置。

在 Editor.log 文件中搜索详细信息,我可以看到 5 个临时文件产生了这种错误:

 -----Compiler Commandline Arguments:
Filename: C:\Program Files\Unity\Hub\Editor\2019.1.5f1\Editor\Data\Tools\RoslynScripts\unity_csc.bat
Arguments: /noconfig @Temp/UnityTempFile-e08d5c71413756945837148f68a69ad6
Responsefile: Temp/UnityTempFile-e08d5c71413756945837148f68a69ad6 Contents:
/target:library
/nowarn:0169
/out:Temp/Unity.TextMeshPro.dll

[接下来是大约 300 行设置,/reference's,/define's 和 paths - 之后是...]
 -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Unity.TextMeshPro.dll
Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
Copyright (C) Microsoft Corporation. All rights reserved.

error CS2011: Error opening response file 'C:\Windows\System32\Temp/UnityTempFile-6d2a68ef4f8feff48b081cfff22fd108'
warning CS2008: No source files specified.
error CS1562: Outputs without source must have the /out option specified
-----CompilerOutput:-stderr----------
-----EndCompilerOutput---------------
- Finished compile Library/ScriptAssemblies/Unity.TextMeshPro.dll

它们的不同之处在于以下几行:

错误一:
 -----CompilerOutput: [...] True--outfile: Temp/Unity.TextMeshPro.dll
error CS2011: Error opening response file 'C:\Windows\System32\Temp/UnityTempFile-6d2a68ef4f8feff48b081cfff22fd108'
- Finished compile Library/ScriptAssemblies/Unity.TextMeshPro.dll

错误2:
 -----CompilerOutput: [...] True--outfile: Temp/Unity.Timeline.dll
error CS2011: Error opening response file 'C:\Windows\System32\Temp/UnityTempFile-e08d5c71413756945837148f68a69ad6'
- Finished compile Library/ScriptAssemblies/Unity.Timeline.dll

错误 3:
 -----CompilerOutput: [...] True--outfile: Temp/Unity.PackageManagerUI.Editor.dll
error CS2011: Error opening response file 'C:\Windows\System32\Temp/UnityTempFile-f2661e8f7fbea0e48843d231bc5bf5d2'
- Finished compile Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll

错误 4:
 -----CompilerOutput: [...] True--outfile: Temp/Unity.CollabProxy.Editor.dll
error CS2011: Error opening response file 'C:\Windows\System32\Temp/UnityTempFile-6b0dbb9b1dfd0a24f95ef817f65e991f'
- Finished compile Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll

错误 5:
 -----CompilerOutput: [...] True--outfile: Temp/Unity.Analytics.DataPrivacy.dll
error CS2011: Error opening response file 'C:\Windows\System32\Temp/UnityTempFile-6b3cf37143da036458b1886861b10eb3'
- Finished compile Library/ScriptAssemblies/Unity.Analytics.DataPrivacy.dll

但它们的共同点是缺少“C:\Windows\System32\Temp\”中的响应文件。我不知道他们为什么要在这个文件夹中查找,因为所有这 5 个临时文件都存在,但在 Unity 项目文件夹中,我希望它们在其中。 Unity 只是不在此文件夹中查找。

图片:位于正确文件资源管理器位置的 Unity 临时文件



这可能是什么以及您将如何解决它?

真诚的,克里斯蒂安

最佳答案

我最近发现了一个 related post :

It turns out that my workplace has set the HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor\Autorun key in the registry to change my current working directory to system32, causing the issue.



我从注册表中删除了 key ,现在它又可以工作了!

关于c# - Unity3d 错误 CS2011 : Error opening response file (incorrect temp folder),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56625972/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com