I wrote my first project using VS2019, but for the rest of my F# work I wanted to try and use dotnet core and VSCode.
I followed the directions on this site’s getting started for VSCode, getting Ionide installed and all that.
I used the dotnet tool to create a simple console application template for F#. So far so good.
But I can’t seem to get it to understand open
. I want to
open System.Security.Principal
but when I try to use, say, WindowsIdentity.GetCurrent().Token
or something, it acts like it doesn’t know what I’m talking about.
I found out through some digging that apparently I have to manually install even System namespace packages into my project. Okay, fine. I did that with
dotnet add package System.Security.Principal
and it seemed to pull down a bunch of stuff and install. The package shows up in my project file. It also seemed to automatically ‘restore’ (whatever that means) my project.
Having done all that…it still doesn’t work.
Why is this difficult? All of this just worked in VStudio. I get that VSCode is more componentized and all that, but something as basic as opening a package shouldn’t be silly like this. What mystic incantation am I omitting to get this to work like a normal project?