Closed 7sharp9 closed 9 years ago
I think its the old path issue with FSI, if the current directory is not the one in the current reference and the reference has other dependent references then you get that error.
This works fine for example:
#I @"/Users/dave/Projects/abcd/abcd/../packages/FSharp.Data.SqlClient.1.5.10/lib/net40/"
#r @"/Users/dave/Projects/abcd/abcd/../packages/FSharp.Data.SqlClient.1.5.10/lib/net40/FSharp.Data.SqlClient.dll"
I wish there was parity between the way things work on Windows and other platforms.
From @rojepp on February 18, 2015 10:1
Could it be that we're missing a #silentCd
, just prior to sending references. Note, I haven't checked the code yet. I just remember a lot of discussion about this ( #162 ) and Dons suggestion to just send it all the time because it is cheap. :)
It is sent before the command, followed by all the #r's afterwards. I suspect in this instance it needs to be sent in-between each #r due to fsi's quirkiness.
From @rojepp on February 18, 2015 10:12
I can try that out later on.
I had a quick look, the current file's path is sent (#silentcd) before the list of #r references. I guess for nugets we will have to reconsider the silentcd logic. In this instance the dependencies are either .Net40 assembles or pcl ones which also muddies things. Actually pcl references are not implicitly added in checker either for tooltips etc, but thats another issue.
Im in the middle of porting for roslyn but Ill take a look when I get a chance.
I cant actually remember how to progress this, implicit pcl references now work fine in fsharpMDXS though.
Moved to bugzilla closing:https://bugzilla.xamarin.com/show_bug.cgi?id=33088
From @rojepp on February 18, 2015 6:0
In a small project that has a NuGet package (FSharp.Data.SqlClient) I right-click in a .fs file and choose 'Send references to F# Interactive', FSI fails to find the NuGet package. Output:
Note that it is actually a valid path to FSharp.Data.SqlClient, and if I copy that
#r
statement and execute it manually, it works. Also note that the error message I get is actually about a dll used by SqlClient.Copied from original issue: fsharp/fsharpbinding#950