Not able to Instrumentation.Publish a Form derived class

G

Girish Hegde

Hi,
I am trying to publish a windows form using WMI. It throws
an exception. But the same code works for a class not
derived from Form. Here is the code. Thanks for your help

Regards
Girish Hegde

[System.Management.Instrumentation.InstrumentationClass
(System.Management.Instrumentation.InstrumentationType.Inst
ance)]
public class Form1 : System.Windows.Forms.Form
{
private System.ComponentModel.Container components =
null;
public Form1()
{
InitializeComponent();

System.Management.Instrumentation.Instrumentation.Publish
(this);
}
}

AssemblyInfo.cs

// Specify which namespace the data should be published
into
[assembly:System.Management.Instrumentation.Instrumented
("root/WindowsApplication3")]

[System.ComponentModel.RunInstaller(true)]
public class WindowsApplication3CustomInstaller:
System.Management.Instrumentation.DefaultManagementProjectI
nstaller
{
}
 
D

Duke Sun

I'm now performing research on the issue, I will update you as soon as
possible.

Best regards,

Duke Sun
Microsoft Online Partner Support
<MCSE/MCDBA/MCSD>

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
D

Duke Sun

I can reproduce the issue on my side. I'm now performing research on it and
will update you the result as soon as possible.

Best regards,

Duke Sun
Microsoft Online Partner Support
<MCSE/MCDBA/MCSD>

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
D

Duke Sun

After extensive research on the issue, I can reproduce the issue on my
side. I always meet a exception on publishing a form. I suspect the issue
is caused by an issue of FrameWork. I have reported the issue to our
developer team. However, there is no workaround available now. Sorry for
the inconvinience to you.

Best regards,

Duke Sun
Microsoft Online Partner Support
<MCSE/MCDBA/MCSD>

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top