So I foolishly changed a setting for the VSCode path to point at the actual absolute path of the exe in Program Files (x86) and it seems to have rather borked my Unity installation.
I now get lots of exceptions like
System.ArgumentException: Illegal characters in path.
at System.IO.Path.IsPathRooted (System.String path) [0x00024] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Path.cs:508
at System.IO.Path.InsecureGetFullPath (System.String path) [0x000dd] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Path.cs:357
at System.IO.Path.GetFullPath (System.String path) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Path.cs:289
at UnityEditor.Utils.Paths.AreEqual (System.String pathA, System.String pathB, Boolean ignoreCase) [0x0003a] in C:\buildslave\unity\build\Editor\Mono\Utils\Paths.cs:87
at UnityEditor.VisualStudioIntegration.UnityVSSupport+<Initialize>c__AnonStoreyBF.<>m__230 (KeyValuePair`2 kvp) [0x00000] in C:\buildslave\unity\build\Editor\Mono\VisualStudioIntegration\UnityVSSupport.cs:38
at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[System.Collections.Generic.KeyValuePair`2[UnityEditor.VisualStudioVersion,System.String]].MoveNext () [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[System.Collections.Generic.KeyValuePair`2[UnityEditor.VisualStudioVersion,System.String]].AddEnumerable (IEnumerable`1 enumerable) [0x0001a] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128
at System.Collections.Generic.List`1[System.Collections.Generic.KeyValuePair`2[UnityEditor.VisualStudioVersion,System.String]]..ctor (IEnumerable`1 collection) [0x00025] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65
at System.Linq.Enumerable.ToArray[KeyValuePair`2] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
at UnityEditor.VisualStudioIntegration.UnityVSSupport.Initialize (System.String editorPath) [0x0006b] in C:\buildslave\unity\build\Editor\Mono\VisualStudioIntegration\UnityVSSupport.cs:38
at UnityEditor.VisualStudioIntegration.UnityVSSupport.Initialize () [0x00000] in C:\buildslave\unity\build\Editor\Mono\VisualStudioIntegration\UnityVSSupport.cs:20
at UnityEditor.SyncVS..cctor () [0x00082] in C:\buildslave\unity\build\Editor\Mono\SyncProject.cs:40
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])
and now I can't open the preferences dialog; it appears black and I get a load more exceptions logged:
NullReferenceException: Object reference not set to an instance of an object UnityEditor.PreferencesWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/PreferencesWindow/PreferencesWindow.cs:267) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:187) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:180) UnityEditor.HostView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:76)
I've tried poking at the registry a bit to unset offending unescaped backslashes etc but it seems the damage has been done. I guess reinstalling Unity (possibly deleting relevant keys in registry in the process) is fairly likely to fix it...
So I foolishly changed a setting for the VSCode path to point at the actual absolute path of the exe in
Program Files (x86)and it seems to have rather borked my Unity installation.I now get lots of exceptions like
and now I can't open the preferences dialog; it appears black and I get a load more exceptions logged:
NullReferenceException: Object reference not set to an instance of an object UnityEditor.PreferencesWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/PreferencesWindow/PreferencesWindow.cs:267) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:187) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:180) UnityEditor.HostView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:76)I've tried poking at the registry a bit to unset offending unescaped backslashes etc but it seems the damage has been done. I guess reinstalling Unity (possibly deleting relevant keys in registry in the process) is fairly likely to fix it...