Visual Studio Community for Mac __SOURCE_DIRECTORY__ isn't working

Viewed 67

I'm trying to access some files in a directory relative to my F# code. However, I can't get __SOURCE_DIRECTORY__ to return anything other than /.

enter image description here

I've managed to use __SOURCE_DIRECTORY__ in Visual Studio on Windows, so can't work out what the problem could be.

I'm seeing this whether I type directly into F# Interactive, create a script file and save it somewhere, or create a project.

The workaround I'm using at present is to hardcode the path to the files, but this shouldn't be necessary.

Version number and other info are as follows: enter image description here

Update: 1. It works when using F# interactive from a Terminal/Command window

enter image description here

1 Answers

This was fixed here and released in versions 7.6.0.947 and 7.5.0.646

Related