2

I'm having a hard time trying to build a F# project in Visual Studio that has dependencies downloaded with Paket. It raises several of the following errors (with different dlls each time):

Could not resolve this reference. Could not locate the assembly "XPlot.Plotly.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245)

For this very example, visual studio adds the option -r:C:\projects\StarWars-social-network-master\packages\XPlot.Plotly\lib\net45\XPlot.Plotly.dll. The file actually exists in my filesystem, so I don't know what I am doing wrong. Can anyone point me to a workaround?

Thank you.

Mark Seemann
  • 225,310
  • 48
  • 427
  • 736
David Jiménez Martínez
  • 3,053
  • 5
  • 23
  • 43

1 Answers1

3

From the directory name, I guess you're looking at Evelina Gabasova's Star Wars network analysis.

As far as I can tell, the project uses F# Script files and so you do not need to compile it at all. It is designed to be used with F# Interactive. Once you open the project, you can look at the individual script files *.fsx, select blocks of code and run them interactively - If you are using Visual Studio, this is done using Alt+Enter - other editors use either this or Ctrl+Enter (Xamarin Studio).

Many F# data analysis scripts follow this pattern - you're not really building a project that needs to be compiled and executed as a whole, so running bits of code from script files immediately makes a lot more sense in this context.

Tomas Petricek
  • 240,744
  • 19
  • 378
  • 553
  • Thank you for your answer, @Tomas. You're right that this example is not a good one maybe to describe my problem, but I just wanted to know why I can't compile the single .fs file that lies in there. But yeah, I can execute the bits though. – David Jiménez Martínez Jan 01 '16 at 19:37
  • 1
    The compilation errors you're getting often happen because visual studio is somehow confused by a project that has lots of scripts in it. If you had a project with a single `fs` file, you wouldn't run into this sort of issues. – Tomas Petricek Jan 01 '16 at 20:16
  • Wow you were right. I tried deleting all the *.fsx files and now it compiled. I thought fsx files were not compiled, I'm not understanding at all why is that so. It is a bit frustrating but oh well. Thanks a lot, @Tomas. – David Jiménez Martínez Jan 01 '16 at 20:27