scripts don't recognize FSharp.Data

f#, f#-data, f#-interactive

Solution

Add a reference in the script to the nuget packages folder that contains FSharp.Data.dll. That folder also contains the designer dll (FSharp.Data.DesignTime.dll)

#r @"<your nuget packages folder>\FSharp.Data.2.1.0\lib\net40\FSharp.Data.dll"

Problem

Somewhat of a F# beginner. I'm trying to test out some of my XmlTypeProvider code in the interactive window by first entering it in a script (fsx) file. The script file won't recognize the following ``` open FSharp.Data // gives "The namespace or module 'FSharp' is not defined" ``` Everything has been added to reference, and .fs files seem to not have any problems finding the XmlTypeProvider reference but for some reason, a script in the same project does not. I even got the code to work in a .fs file. I added FSharp.Data with nuget and everything seem to add correctly. What am I missing here?

Original source

Related problems