The exception is
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'PureCloudPlatform.Client.V2.Client.Configuration' threw an exception.
Source=TjuContactImport
StackTrace:
at TjuContactImport.MainWindow.GetExternalContacts() in D:\TjuContactImport\TjuContactImport\MainWindow.xaml.cs:line 86
at TjuContactImport.MainWindow..ctor() in D:\TjuContactImport\TjuContactImport\MainWindow.xaml.cs:line 42
Inner Exception 1:
TypeLoadException: Could not load type 'RestSharp.IRestClient' from assembly 'RestSharp, Version=108.0.1.0, Culture=neutral, PublicKeyToken=598062e77f915f75'.
In my project I'm using the latest nuget package for PureCloudPlatform.Client.V2 (ver 146.0.0) and RestSharp looks to be the latest version as well, ver 108.0.1
UPDATE: I downgraded the PureCloud package to 145.0.4 and RestSharp to 106.13.0 to clear up the error. I would still like to understand why the error occurs when using the latest of both packages.
I also got a different error when using the latest version of both packages but using the downgraded package versions solved it. I'll have to look further into the issue.
It also works for me if I don't manually include RestSharp in the project as a dependency.
We will update to the latest version of RestSharp.
I can't guarantee exactly when we will release the update but we'll include a message in the release notes when it happens.