Not able to Instrumentation.Publish a Form derived class

  • Thread starter Thread starter Girish Hegde
  • Start date Start date
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
{
}
 
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.
 
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.
 
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.
 
Back
Top