Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PerformanceCounterCategory.GetCategories() throws exception ArgumentException - Invalid value '' for parameter 'categoryName'

When I try to run this code:

var categories = System.Diagnostics.PerformanceCounterCategory.GetCategories();

I get an ArgumentException exception.

I already tried the following with no luck:

  • How to manually rebuild Performance Counter Library http://support.microsoft.com/kb/300956
  • lodctr /R
  • Logged in as a local administrator.
  • Disabled User Access Control (UAC)
  • Made my user member of the Performance Monitor Users group.

I get the same result whether I run Visual Studio 2008, 2010 or 2012, on a Windows 7 Enterprise SP1 64-bit computer.

I will appreciate any help.

Thank you.

like image 690
Gerardo Melendrez Avatar asked Sep 11 '13 21:09

Gerardo Melendrez


1 Answers

Had the same problem.

This was on a machine that had an NVidia Quadro 2000 card.

Uninstalling the "NVidia WMI" product solved the issue... :)

like image 104
RnR Avatar answered Sep 23 '22 15:09

RnR