Execute this:

#r "nuget: FSharp.Data"

open FSharp.Data

type WorldBank = WorldBankDataProvider<"World Development Indicators", Asynchronous=true>

let data = WorldBank.GetDataContext()

let countries = data.Countries

let aus = countries.Austria

For any country, etc. I get:

error FS0039: The type 'Countries' does not define the field, constructor or member 'Austria'.

I have two systems: almost identical in terms of applications and tools installed (e.g., same .NET SDK, .NET Runtime, VS Community 2022) with the only difference being one is WIN 10 machine and the other a WIN 11 machine.

The same lines of code in the same project: One system is OK and the other throws all red-wiggly lines.

1

There are 1 best solutions below

0
On

Issue Resolved So Far:

  • Removed all .NET SDK, Runtimes, etc.
  • Uninstalled Visual Studio 2022 Community and all related products.
  • Deleted any remaining folders.
  • Cleaned up Windows Registry from all traces of aforementioned applications.
  • Reinstalled VS 2022 Community.

I had several .NET SDK versions: 2.1, 3.1, 5, and 6 on my computer. Deleting the 2 and 3 solved the problem.