Connecting to the vSphere Client fails with the error: VirtualInfrastructure.Utils.AssemblyResolver Threw an Exception
search cancel

Connecting to the vSphere Client fails with the error: VirtualInfrastructure.Utils.AssemblyResolver Threw an Exception

book

Article ID: 308860

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • Launching the vSphere Client in Windows fails while attempting to log in.
  • You see the error:

    [ :ShowExcp:M: 6] 2011-05-27 10:35:30.520 Error: An internal error occurred in the vSphere Client.
    Details: The type initializer for 'VirtualInfrastructure.Utils.AssemblyResolver' threw an exception.


  • The vSphere Client logs contain entries similar to:

    [ :ShowExcp:M: 6] 2011-05-27 10:35:30.520 Error: An internal error occurred in the vSphere Client.
    Details: The type initializer for 'VirtualInfrastructure.Utils.AssemblyResolver' threw an exception.

    Contact VMware support if necessary.
    System.TypeInitializationException: The type initializer for 'VirtualInfrastructure.Utils.AssemblyResolver' threw an exception.
    at VirtualInfrastructure.Utils.AssemblyResolver.set_MainAppPath(String value)
    at VpxClient.UI.OnSuccessfulLogin()
    at VpxClient.UI.OnLoginEvent(String message, Object[] args)
    System.NullReferenceException: Object reference not set to an instance of an object.
    at VirtualInfrastructure.Utils.AssemblyResolver.SetupDefaultPathVariables()
    at VirtualInfrastructure.Utils.AssemblyResolver..cctor()

Note: vSphere Client logs are located by default at %USERPROFILE%\Local Settings\Application Data\VMware\vpx



Environment

VMware vCenter Server 4.1.x
VMware vCenter Server 4.0.x
VMware vCenter Server 5.0.x

Resolution

This issue may occur when vSphere Client cannot start because the required Path environment variable is not set or set incorrectly.

To display the environmental variables on the system, go to the Windows DOS cmd prompt, and run the command: set

For example, a working Path is (for Windows 7 x64):
%SystemRoot%\system32;%SystemRoot%;


Note:
  • To edit or set the Path environment variable, go to System Properties > Advanced > Environment Variables > System variables
  • Edit the variable Path as appropriate, or create if it is missing