Home » questions » Exception when I run a program developed with C# .net 2.0?
Exception when I run a program developed with C# .net 2.0?
I used visual studio 2005 to developed an application. it was working well. recenty i used "Computerinfo" class of "Microsoft.VisualBasic.Devices" namespace. for which I had to add a visual basic dll as reference. But my problem is when I run the program from Visual Studio 2005 IDE It works fine. but after publishing It throws an exception with 'detail', 'quit' and 'continue' button.
************** Exception Text **************
System.Management.ManagementException: Provider load failure
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
at System.Management.ManagementObjectCollection.get_Count()
at Microsoft.VisualBasic.Devices.ComputerInfo.get_OSManagementBaseObject()
at Microsoft.VisualBasic.Devices.ComputerInfo.get_OSFullName()
at MountUp.MainUI.MainUI_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(.....

Answers
Mills
On 2006-08-01 13:42:25