Question by
aplerdal01 · Dec 09, 2021 at 08:30 AM ·
errorerror message
Unity cannot find bat files when opening
When I open up unity, I get the following error
Win32Exception: ApplicationName='C:\Program Files\Unity 2020.3.24f1\Editor\Data\Tools\RoslynScripts\unity_csc.bat', CommandLine='/noconfig @Temp/UnityTempFile-ed4462b2f8c0f924db7f16aaea9b8cf0', CurrentDirectory='', Native error= The system cannot find the file specified.
System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <0463b2ef957545c0a51b42f372cd4fbb>:0)
System.Diagnostics.Process.Start () (at <0463b2ef957545c0a51b42f372cd4fbb>:0)
(wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Utils.Program.Start () (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.BeginCompiling () (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Scripting.ScriptCompilation.CompilationTask.QueuePendingAssemblies () (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Scripting.ScriptCompilation.CompilationTask.Poll () (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScriptAssemblies (UnityEditor.Scripting.ScriptCompilation.ScriptAssembly[] scriptAssemblies, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings scriptAssemblySettings, System.String tempBuildDirectory, UnityEditor.Scripting.ScriptCompilation.CompilationTaskOptions compilationTaskOptions, UnityEditor.Scripting.ScriptCompilation.EditorCompilation+CompileScriptAssembliesOptions compileScriptAssembliesOptions) (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScriptsWithSettings (UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings scriptAssemblySettings, System.String tempBuildDirectory, UnityEditor.Scripting.ScriptCompilation.TargetAssembly[]& notCompiledTargetAssemblies, System.String[]& notCompiledScripts, UnityEditor.Scripting.ScriptCompilation.CompilationTaskOptions compilationTaskOptions) (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScripts (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions editorScriptCompilationOptions, UnityEditor.BuildTargetGroup platformGroup, UnityEditor.BuildTarget platform, System.String[] extraScriptingDefines, UnityEditor.Scripting.ScriptCompilation.CompilationTaskOptions compilationTaskOptions) (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface+<>c__DisplayClass39_0.<CompileScriptsNoStop>b__0 () (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.EmitExceptionAsError[T] (System.Func`1[TResult] func, T returnValue) (at <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:CompileScriptsNoStop(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget, String[])
I have tried the following in order to fix this
checking the enviroment variables to make sure they run cmd.exe
reinstalling unity
running the unity exe as an administrator
If anyone can help I would appreciate it.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613050350im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
I cant figure out these errors 0 Answers
ArgumentOutOfRange: Argument is out of range Parameter name: index 0 Answers
error when login 0 Answers