private void GetProcessor ()
{
ManagementObjectCollection mbsList = null;
ManagementObjectSearcher mbs = new ManagementObjectSearcher("Select * From Win32_processor");
mbsList = mbs.Get();
foreach (ManagementObject mo in mbsList)
{
ProcesadorSerial = mo["ProcessorID"].ToString();
}
}
All works fine if I have as reference System.Management.dll but while dll is an old dll from .net 3.x
If I use this dll of .net 4.x I have this error in output windows
Error on calling 'OnStartUp' method for indicator 'xxxxxxxxxxxxxx': Los controladores AssemblyResolveEvent no pueden devolver ensamblados cargados sólo para reflexión.
I don´t know what´s the problem and I´ve read documentation about this error but I don´t understand the problem and neither the solution, some help please.
Thanks so much.
Comment