ElasticEmail / elasticemail-csharp

ElasticEmail - the C# library for the Elastic Email REST API
5 stars 0 forks source link

FileLoadException: could not load file or assembly 'RestSharp' Version=106.11.4.0 #1

Closed ashraf789 closed 3 years ago

ashraf789 commented 3 years ago

Hello, Thanks for the library. I am trying to use this library on my project and I am getting some Exceptions.

Exceptions details: According to instruction i installed latest RestSharp 106.11.7 and I am getting "FileLoadException" Screenshot_49

This issue probably from the library. so I downgrade the RestSharp version to 106.11.4 now I am not getting a different issue.

Screenshot_51

My EmailMessageData:

Screenshot_50

Environment: -> Windows 10 -> Visual studio 2019

Let me know if there any other information required.

ashraf789 commented 3 years ago

It was my configuration problem. After uninstalling the library and updating web.config, package, reinstall restsharp then the library. Now it's working.

Another problem was my "from email" was not verified from elasticemail. The Try catch() was ApiException so it was not displaying the exception message after changing it to catch (Exception e) i got the actual error message.