It's due to a feature of the F# plugin in VS2017 that can be useful but also annoying.

In the completion list that shows up when you type an identifier, it doesn't only include identifiers that are in scope, but also some that would be if you added an open. If you select such an identifier, it completes it and also adds the corresponding open. Unfortunately, 1) it's easy to inadvertently select an item by just pressing space, and 2) WebSharper has a lot of potential identifiers that would trigger this, being all the HTML elements and attributes.

I'm now realizing that we could add [<RequireQualifiedAccess>] on WebSharper.UI.Next.CSharp.Html; that should at least take care of this one. The problem can still happen with WebSharper.UI.Next.Html though, which is intended to be opened; I don't think there is much we can do about this one.

By on 9/8/2017 7:41 AM ()

Thanks. I now unchecked the VS F# Editor feature "Show symbols in unopened namespaces". This will hopefully resolve it for me.

By on 9/8/2017 8:14 AM ()