Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specified method is not supported #78

Open
sheganinans opened this issue Feb 17, 2017 · 0 comments
Open

Specified method is not supported #78

sheganinans opened this issue Feb 17, 2017 · 0 comments

Comments

@sheganinans
Copy link

Description

Standard WMI interface works, but the type provider does not.

Repro steps

Given this code:

let test () =
    type Local = WmiProvider<"localhost">
    let wmi = Local.GetDataContext ()
    for e in wmi.Win32_PnPEntity do
        printfn "%s" e.Caption

At design time, there is no error and Intellisense works properly (Caption shows up in the suggestion list), however at compile time, there is this error:

Unexpected exception from provided type 'FSharp.Management.WmiProvider,MachineName="localhost"+ServiceTypes+Win32_PnPEntity' member 'GetMethods': The type provider 'FSharp.Management.DesignTime.WmiExtender' reported an error: Specified method is not supported.

However this works, if I use the low-level WMI interface:

let srch = new ManagementObjectSearcher ("SELECT * FROM WIN32_PnPEntity")
// etc...

As expected, the Captions are printed.

Related information

  • Operating system: Windows 10
  • Branch: 0.4.3 Master
  • .NET Runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant