System.ArgumentException: Cannot Dock To The Side Of An Auto-Hide Target. (Parameter 'target') When Trying To Debug A UiPath Studio Project

How to solve the error "An internal error has occurred. It is recommended to restart UiPath Studio. Error: System.ArgumentException: Cannot dock to the side of an auto-hide target. (Parameter 'target')..." in UiPath Studio -> Debug?

Issue Description: Try to run the UiPath Studio project in Debug mode but this error occurred:

2.png

22.10.5+Branch.support-v22.10.Sha.79bc7c61a909d990afd07620b3005b3a35eb1f1b

An internal error has occurred. It is recommended to restart UiPath Studio.

Error: System.ArgumentException: Cannot dock to the side of an auto-hide target. (Parameter 'target')

at ActiproSoftware.Windows.Controls.Docking.ToolWindow.Dock(IDockTarget target, Side side)

at UiPath.Studio.Shell.Views.MainWindow.EnsureToolWindowIsInVisualTree(IToolWindow tool)

at UiPath.Studio.Shell.Views.MainWindow.EnsureAllToolWindowsAreInTheVisualTree()

at UiPath.Studio.Shell.Views.MainWindow.<>c__DisplayClass64_0.<SwitchLayout>b__0()

at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2147024809

Root Cause: A known issue since Studio 2022.10.3:

On rare occasions, an error with the message System.ArgumentException: Cannot dock to the side of an auto-hide target. (Parameter 'target') occurs during project compilation. As a workaround, reload the project.

Reference: Studio Release Notes 2022.10.3 - Known Issues .

Resolution: Try the below solutions,

Approach #1

  • Open Studio -> click on Home -> Settings -> General -> Reset Settings -> Reset -> Relaunch the UiPath Studio -> retry to debug the project

Approach #2

  1. Reload the UiPath Studio project
  2. Retry to debug the project.

Approach #3

  1. Go to Control Panel -> Programs -> Apps and Features -> Uninstall the UiPath Platform Installer (if exists) and UiPath Studio
  2. After the UiPath Studio/Robot uninstallation, delete the below folders if exists:
  • The settings in the folders %PROGRAMDATA%\UiPath, %LOCALAPPDATA%\UiPath, and %APPDATA%\UiPath
  • The packages folder %USERPROFILE%\.nuget\packages
  • The NuGet cache folder %LOCALAPPDATA%\NuGet\v3-cache
  • The Assistant processes folder in the Windows Start menu %APPDATA%\Microsoft\Windows\Start Menu\Programs\UiPath Assistant Processes
  • The content from the %temp% folder

  1. Restart the Studio machine
  2. Install again the UiPath Studio/Robot using this installer https://download.uipath.com/versions/22.10.5/UiPathStudio.msi
  3. Relaunch the UiPath Studio -> retry to debug the project.