Here is the scenario:
In F# Interactive, the default directory to search is the source directory. You can query it easily using __SOURCE_DIRECTORY__
.
This behaviour is very convenient to allow you to use relative paths. You often have fsx
files in the same folder with fs
files.
#load "Ast.fs"
#load "Core.fs"
When your refer to a relative path, F# Interactive will always use the implicit source directory as the starting point.
#I ".."
#r ... // Reference some dll in parent folder of source directory
#I ".."
#r ... // Reference some dll in that folder again
If you want to remember the old directory for next reference, you should use #cd
instead:
#cd "bin"
#r ... // Reference some dll in bin
#cd "Debug"
#r ... // Reference some dll in bin/Debug