Building with Visual Studio Code (on OSX)

I am not sure is this helps you. I just setup everything in Windows 10 with Visual Studio Community 2017 and it works (so far).

I worked mostly according to these lists:
https://www.visualmicro.com/page/User-Guide.aspx?doc=Getting-started.html
https://www.visualmicro.com/page/User-Guide.aspx?doc=First-steps.html
https://www.visualmicro.com/page/User-Guide.aspx?doc=Test-New-Installation.html

I documented what I did. Here is my list:
Visual Studio Community 2017 was installed
Update to newest version (15.8.8)
Add C++ in VS
Restart PC
In VS: Tools, Extensions and Updates
Search in Online for Arduino
Download Arduino IDE for Visual Studio
Restart VS to install it.
After Restart Window "Configure Ide Locations" comes up
I press "Download/Install Ide"
I download: Windows Installer, for Windows XP and up
arduino-1.8.7-windows.exe
I install that file in default folder
C:\Program Files (x86)\Arduino

Remarks for the OP
The Window "Configure Ide Locations" needs the path to the .exe file.
In my case C:\Program Files (x86)\Arduino
I am sure that is important and that might be the missing part in your installation

Test according to list below
make first project
error
buy screen - ignore in the moment
Connect Arduino
Use Arduino standard program to find port
Close Arduino standard problem (otherwise the port is blocked by that program)
Set in VS the Arduino type and port
Copy blink program to VS
compile ok
Upload error can't open device
close, open, try again, check connection, try again, ok

Until now simple projects work.
I still have to figure out a project with a library which uses another library.