The type initializer for 'Keysight.OpenTap.Gui.App' threw an exception

Hi , I am trying to use the “ssh steps” code from open Tap git.
When I try to run the program in my Visual studio I am getting this exception - “The type initializer for ‘Keysight.OpenTap.Gui.App’ threw an exception.” Can anyone please help to resolve what could be the issue.
Thanks.

I think this is caused by a misconfiguration inside the csproj generated by the sdk.

If you open your project csproj file, can you set the version of Developer’s System to 9.17.4 (or whichever version you are using?).

E.g:

<AdditionalOpenTapPackage Include="Developer's System" Version="9.17.4"/>

Hi, I tried this, but still getting same error.

OK, worth a shot… :slight_smile:

Can you provide the exact steps to reproduce the issue?

1 Like

Hi Rolf,

So I am trying to use the ssh net method for a device and I am using this source code - “Files · master · OpenTAP / Plugins / Keysight Technologies / SshSteps · GitLab” when I am trying to run this on my system with visual studio 2019 getting the above mentioned exception. this is the exception detail -
"System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for ‘Keysight.OpenTap.Gui.App’ threw an exception.
Source=
StackTrace:

Inner Exception 1:
FileNotFoundException: Could not load file or assembly ‘OpenTap, Version=9.17.4.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for ‘Keysight.OpenTap.Gui.App’ threw an exception.
Source=
StackTrace:

Inner Exception 1:
FileNotFoundException: Could not load file or assembly ‘OpenTap, Version=9.17.4.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
"

Can you please help me on this?

1 Like

@rolf_madsen any ideas here or is it possibly an issue with the SSH plugin?

I have no other ideas at the moment.