error CS2011: Error opening response file (incorrect temp folder)

Hello community,

I need your 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 each fresh startup 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 VS2017 did not help.



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 drives and 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.

139572-90b62144-6631-451c-80e8-b35f2cd48b32.jpg

What can this be and how you would fix it?

Sincerely,
Christian

Somebody?

I deleted the .vs folder and generated solution file, let unity regenerate them. booom, problem solved.