fsprojects / FSharp.Configuration

The FSharp.Configuration project contains type providers for the configuration of .NET projects.
http://fsprojects.github.io/FSharp.Configuration/
Other
114 stars 63 forks source link

YamlConfig intellisense fails on Visual Studio 16.10.0 and above #162

Open sircuri opened 2 years ago

sircuri commented 2 years ago

The moment we upgraded to Visual Studio 16.10.0 we get intellisense issues on dependent projects that use the YamlConfig type provider.

I have created a public repository with a minimal Visual Studio solution that shows the error: https://github.com/sircuri/yamltypeprovider

If you open this solution in Visual Studio 16.9.10 or below, no intellisense errors are shown in the file Boundaries.fs. If you open the solution in Visual Studio 16.10.0 and above, the F# file complains about missing the Framework-namespace.

Visual Studio 16.9.10 < image

Visual Studio 16.10.0 > image If you now remove the YamlConfig declaration from Daemon.fs, the error goes away.

The compiler does not show any errors on either versions of Visual Studio.

The IniFile provider does work correctly on both Visual Studio versions. Only the YamlConfig type seems to be affected. I hope you are able to help with this.

sergey-tihon commented 2 years ago

It is very strange. Have you tried restart IDE? =) Just tried in VS 16.11.3 and it works

image
sircuri commented 2 years ago

Can you please open the Boundaries.fs file from the other project. That is the one that is failing.

sergey-tihon commented 2 years ago

Ah, I see! It really looks like IDE regression https://github.com/dotnet/fsharp/issues/12078 & https://github.com/dotnet/fsharp/issues/12082

sircuri commented 2 years ago

Thank you very much. I tried to find answers and solutions to this problem but could not find any. Thanks for pointing to those other issues. It indeed looks like the same issue I'm facing. I do wonder why the INI type provider does not appear to be affected.

sergey-tihon commented 2 years ago

Interesting, but it works in VS2022 Preview 4 so you can use cutting edge IDE )))

image