Reputation: 2903
Trying to use the json type provider, unsuccesfully. After runnings the following commands :
I can't seem to be able to make the following error go away : JsonProvider is undefined
open FSharp.Data
open Microsoft.FSharp.Data.TypeProviders
type JsonObj = JsonProvider<"http://shopicruit.myshopify.com/products.json">
I'd like to know what's currently missing because I can't see why this F# snippet is not right.
UPDATE
Here's a capture of my installs
Here's a capture of my type provider settings. (They were already enabled). I don't get what I'm missing at the moment...
Upvotes: 2
Views: 854
Reputation: 503
When installing a NuGet Package to a project via the Package Manager Console, make sure that the value in the "Default project" field is the project you want to install the package to:
This has happened to me many times, including while trying to reproduce your issue. Also, as @Tomas Petricek says in the comments - both to your question and to my previous attempt at an answer here - you don't need to open Microsoft.FSharp.Data.TypeProviders
. JsonProvider
works with just a reference to FSharp.Data
.
In case you mistakenly installed the package to the wrong project, you can either:
Uninstall-Package
to remove it, again making sure the "Default project" field targets the project in question, or;Upvotes: 3