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
  • 14,195
  • 22
  • 56
  • 52
Vikesh
  • 2,018
  • 6
  • 23
  • 33

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,870
  • 3
  • 25
  • 32
2

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

Stecya
  • 22,896
  • 10
  • 72
  • 102
ilissan
  • 21
  • 1