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

WMI provider: exception when instantiating Msvm_VirtualSystemManagementService #269

Closed
blumu opened this issue Oct 28, 2013 · 1 comment
Closed

Comments

@blumu
Copy link

blumu commented Oct 28, 2013

(Bug inherited from F# Sample pack: see https://fsharp3sample.codeplex.com/workitem/2934)

The WMI Type provider fails with an exception when trying to instantiate the HyperV WMI class Msvm_VirtualSystemManagementService.

Repro script

#r @"System.Management.dll"
#r @"packages\FSharpx.TypeProviders.Management.1.8.41\lib\40\FSharpx.TypeProviders.Management.dll"
open System.Management
open FSharpx.TypeProviders.Management
type Local = WmiProvider<"localhost", @"root\virtualization\v2">
let local = Local.GetDataContext()
let hyperv = local.Msvm_VirtualSystemManagementService

Result

hyperv_tp_fsharpx.fsx(5,1): error FS3021: Unexpected exception from provided type 'FSharpx.TypeProviders.Management.WmiProvider,MachineName="localhost",Namespace="root\\virtualization\\v2"+ServiceTypes+Msvm_VirtualSystemManagementService' member 'GetMethods': The type provider 'FSharpx.TypeProviders.Management.DesignTime.WmiExtender' reported an error: Not found 

Source
The exception is thrown by the failwith at line 73 of file WmiProvider.DesignTime.fs

| CimType.Reference when tyName.StartsWith("ref:") ->
            if wmiProp.IsArray then
                failwith (sprintf "Unexpected type: %A array" wmiProp.Qualifiers.["cim_type"].Value)
@fsgit
Copy link
Contributor

fsgit commented Sep 26, 2014

Closing as the WMI type provider has moved to https://github.com/fsprojects/FSharp.Management. Please reopen there if necessary,

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

2 participants