1

I am developing a Microsoft Surface 2.0 application using Visual C# 2010 Express Edition. I have already installed the Surface 2.0 SDK and Runtime Environment on a Windows 7 (32 bit).

From the installed templates, I choose a new Surface WPF application and press F5. I get an InvalidOperationException with the following message -

Cannot load Counter Name data because an invalid index 'Terminal Services' was read from the registry.

The project is empty. I haven't added a single line of code yet. The same blank application works perfectly well on another desktop running Visual Studio 2010 Ultimate.

JasonMArcher
  • 12,386
  • 20
  • 54
  • 51
Vikesh
  • 1,948
  • 5
  • 21
  • 31

2 Answers2

2

I would try here first: PerformanceCounters on .NET 4.0 & Windows 7

Most likely the performance counters are not loading in the registry, or at least not loaded properly. I know the question is different, but the symptoms are the same.

Community
  • 1
  • 1
Gregory A Beamer
  • 16,342
  • 3
  • 23
  • 29
2

Run lodctr.exe /r it will repair registry entries related to the perfmon counters.

Stecya
  • 21,562
  • 8
  • 67
  • 101
ilissan
  • 21
  • 1