How can I use FSharp.Data with VS 2015?

I am trying to use FSharp.Data in a script file in an FSharp project, and the error I get is:

The warning '.. \ packages \ FSharp.Data.2.2.5 \ lib \ net40 \ FSharp.Data.dll' is an invalid assembly name.

FSharp.Data from https://www.nuget.org/packages/FSharp.Data/

This is the same problem if I try to execute an F # project for .NET 4.0, .NET 4.5 or .NET 4.6.

EDIT: It works great with '.. \ packages \ FSharp.Data.2.2.5 \ lib \ portable-net40 + sl5 + wp8 + win8 \ FSharp.Data.dll', but only portable versions are only supported for websites .

+7
f # visual-studio-2015 f # -data
source share
1 answer

I think the problem is string escaping. In the following:

#r "..\packages\FSharp.Data.2.2.5\lib\net40\FSharp.Data.dll" 

\n interpreted as a newline, so it is not valid. But in the following:

 #r "..\packages\FSharp.Data.2.2.5\lib\portable-net40+sl5+wp8+win8\FSharp.Data.dll" 

.. there are no special escape sequences in the line. Both of them should work:

 #r @"..\packages\FSharp.Data.2.2.5\lib\net40\FSharp.Data.dll" #r "..\\packages\\FSharp.Data.2.2.5\\lib\\net40\\FSharp.Data.dll" 
+8
source share

All Articles