In my project I am opening a file with some relative path to the executable. I was trying to test my code in the F# Interractive window, but it seems to run from a completely different path. How can I change the path/ make it run from the same path as the project?
F Letter Grade is a 0.0 GPA or 65 or below% – GPA Calculator.
Failed classes count toward your GPA, though some colleges do not count pass/fail classes in your GPA calculation. If you get an F, you still have to pay for the class without receiving any credit toward your degree. What's more, failed classes don't count toward graduation requirements either.
F - this is a failing grade.
I think __SOURCE_DIRECTORY__
identifier could help here.
You should use compiler directives to separate between using F# Interactive and compiling F# project.
#if INTERACTIVE
let path = __SOURCE_DIRECTORY__ + some_relative_path
#else
let path = another_relative_path
#endif
You could set the current working directory when running in FSI:
#if INTERACTIVE
System.IO.Directory.SetCurrentDirectory("<project_path>")
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With