In FSI, resolving DLLs with the #load directive seems to work differently on Mac than on both Windows and Linux #17363
Unanswered
somelinguist
asked this question in
Q&A
Replies: 1 comment
-
I was actually able to resolve the issue using the helper script on Mac by making the project dll target It's still strange to me, however, that it worked to reference the same dependencies directly in the main script with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been working on a project for a while for use with FSI that requires loading several other DLLs as a dependencies. Almost all of the work has been on Windows until today, and I've loaded a helper script to reference the required DLLS.
For example, the helper script is something like:
Then from any script I write, I just do:
Then I run the main scripts via
dotnet fsi mainScript.fsx
or via the FSI button in Ionide.As I've said, this has worked on Windows for a while. Today, I saw that some of the dependencies were updated work on both Linux and Mac.
On Linux, I was able to get the same setup working with only adding one additional dependency to the
helperScript.fsx
:However, when I did the same thing on Mac, I kept getting several dependencies not being found by other dependencies when using the
helperScript.fsx
. I double checked, and the dependencies are actually in the correct location specified by#I
. I also made sure to load the right run-time needed by Mono.Unix on Mac.However, I just discovered that if I abandon the
#load "helperScript.fsx"
call and reference all of the dependencies directly in the main script, it works on Mac.Just the fact moving references to the main file works makes me wonder if the way dependencies get resolved with
#load
is different on Mac than on Windows and Linux. Again, all of the required DLLs are actually in the location reference with#I
.As there are several dependencies that need to get loaded, it's been very helpful to be able to just use
#load "helperScript.fsx"
when writing new scripts that make use of the project.Any ideas? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions