I have a VB.Net ClassLibrary project in VS 2019 and .Net Framework 3.5. The project has a reference to RestSharp. I then reference my class library project in a Windows Forms Application .NET Framework 3.5 app.
In the library, I have this code:
Dim client As New RestSharp.RestClient With {.BaseUrl = New Uri(IQProURL + "api/vault/" + id)}
does not throw an error, but also the below code with client is not able to generate a response:
Dim response = client.Execute(request)
However, if I reference my same class library using a Windows Application with .NET Core 3.1, everything works fine.
I am expecting a Json object as the response. I need to use this with the .NET Framework 3.5 app. How can I do this?
.NET Framework 3.5 reached the end of life a long time ago, and it's no longer supported by RestSharp. You need to visit NuGet.org and find the version of RestSharp that is compatible with .NET Framework 3.5. You need to be aware that neither .NET Framework 3.5, nor old versions of RestSharp receive any security patches or any other fixes.