0

I need your help. (already posted in here without help)

I have just installed Unity on a second computer in "C:\Program Files\Unity\Hub\Editor\2019.1.5f1\" and get 5 errors directly after I launch Unity and can't neither compile anything nor enter Unity play mode. On my first computer these errors do not exist. It does not matter if it is a blank project or one with lots of assets. Both computers run on Windows 10 64-bit with Visual Studio Professional 2017. Re-installations of Unity and Visual Studio did not help so far.

Image: Unity console with errors

I already read many other posts about similar issues related to "error opening response file", but they mostly referred to symlinks or paths with write protection. My issue seems different, with the editor just at "C:\Program Files\Unity\Hub\Editor\2019.1.5f1\" and the project at "C:\Projekte\New Unity Project\". Changing the project path does not matter. I already tried 3 different drive locations.

Searching through the Editor.log file for details, I can see the 5 temp files produce this kind of error:

 -----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

[Followed by about 300 lines of settings, /reference's, /define's and paths - followed by...]

 -----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

What they differ from each other are these lines:

Error 1:

 -----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

Error 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

Error 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

Error 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

Error 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

But what they all have in common is that they are missing the response file in "C:\Windows\System32\Temp\". I don't know why they are looking in this folder, since all these 5 temp files are existing, but in the Unity project folder, where I would expect them. Unity just does not look in this folder.

Image: Unity temp files at correct File Explorer location

What can this be and how you would fix it?

Sincerely, Christian

derHugo
  • 83,094
  • 9
  • 75
  • 115
  • Welcome to StackOverflow! Note that `C:\Windows\System32\Temp` is not the same as `...\NewUnityProject\Temp` .... so I guess something is already wrong with where VS looks for those files ... – derHugo Jun 17 '19 at 06:53
  • Thanks, derHugo. Glad to be here! You are right, but I don't know how to fix this misbehavior. – Christian Flock Jun 17 '19 at 07:12
  • as `C` usually is the System folder with write protection and you store your project in `C:\Projekte\New Unity Project` .. I know you mentioned it but did you try to store/create the project actually in your `C:\Users\\Documents` folder? – derHugo Jun 17 '19 at 07:15
  • you seem to have a global variable `@Temp` defined that refers to `C:\Windows\System32\Temp` when VS tries to open e.g. `Temp/Unity.TextMeshPro.dll` so it uses the System `Temp` instead ... never saw this before – derHugo Jun 17 '19 at 07:18
  • I did not try `C:\Users\\Documents` yet, but `D:\Projekte` on my HDD rather than `C:\Projekte` on my SSD. I will try your suggestion later. – Christian Flock Jun 17 '19 at 11:24

1 Answers1

1

I recently found a 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.

I deleted the key from registry and now it's working again!