Search code examples
f#plivo

F# & Plivo - Could not load type "Plivo.API.RestAPI"


I'm currently trying to write a simple F# app that will send a message from one number to another. I've been working around this error for a while but can't seem to get it working.

Here's what I have:

open Plivo.API
open RestSharp

let plivoApi = new RestAPI("MA***", "OT******");

let dict = new System.Collections.Generic.Dictionary<string,string>()
dict.["src"] <- "1111111111"
dict.["dst"] <- "2222222222"
dict.["text"] <- "Hi, text from Plivo via the F sharp App."

let resp = plivoApi.send_message(dict)
printf "%s" (resp.ToString())

Here's the error: enter image description here

Package versions:

RestSharp: v 105.2.3

Plivo: v 3.0.2

Any suggestions?


Solution

  • You should look at changing your .NET environment this could be the issue. Your code is working fine for me