# VScode/Ionide namespaces don't work

**URL:** <https://forums.fsharp.org/t/vscode-ionide-namespaces-dont-work/1376>\
**Category:** General\
**Tags:** beginners\
**Created:** [July 14, 2020, 10:58pm UTC](https://forums.fsharp.org/t/vscode-ionide-namespaces-dont-work/1376 "2020-07-14T22:58:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmhickman](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/jmhickman/32/796_2.png) [@jmhickman](https://forums.fsharp.org/u/jmhickman)\
**Post date:** [July 14, 2020, 10:59pm UTC](https://forums.fsharp.org/t/vscode-ionide-namespaces-dont-work/1376/1 "2020-07-14T22:59:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jmhickman](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/jmhickman/32/796_2.png) [@jmhickman](https://forums.fsharp.org/u/jmhickman)\
**Post date:** [July 15, 2020, 8:38pm UTC](https://forums.fsharp.org/t/vscode-ionide-namespaces-dont-work/1376/2 "2020-07-15T20:38:11Z")

</div>

I seem to have made headway.

It seems you have to give the precise right name to the thing you want to import. The tool won’t resolve the assembly correctly for you.

So even though `dotnet` did…something(?), when I added the `System.Security.Principal` package, whatever it did wasn’t the right thing. I had to tell it to use the `System.Security.Principal.Windows` package. I was apparently supposed to know that by looking at the API reference on MSDN.

After doing that, a new line was added to the project file, and the needed namespace started resolving.

This is just…odd. Why did `dotnet` appear to do something the first time when it actually did nothing? Can’t it resolve the correct assembly name for me?

I dunno. Not impressed with it so far, but at least I can actually try things now.
