The Type Initializer For 'UiPath.NuGet.UiPathUtils' Threw An Exception

How to troubleshoot error "The type initializer for 'UiPath.NuGet.UiPathUtils' threw an exception" when running a Robot from Orchestrator?

Error Description: "The type initializer for 'UiPath.NuGet.UiPathUtils' threw an exception" when running a Robot from Orchestrator.

Steps to be taken

  1. Check the format of Nuget.config in System32 folder in path C:\Windows\System32\config\systemprofile\AppData\Roaming\NuGet which should be as below

<?xml version="1.0" encoding="utf-8"?>




  1. If the NuGet.Config file is not available in System32 folder, it will be available in SysWOW64 folder:
  • C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\NuGet