开发 Microsoft Surface 2.0 应用程序时出现 InvalidOperatioException
我正在使用 Visual C# 2010 Express Edition 开发 Microsoft Surface 2.0 应用程序。我已经在 Windows 7(32 位)上安装了 Surface 2.0 SDK 和运行时环境。
从已安装的模板中,我选择一个新的 Surface WPF 应用程序并按 F5。我收到带有以下消息的 InvalidOperationException
-
无法加载计数器名称数据,因为索引“终端”无效 Services' 是从注册表中读取的。
该项目是空的。我还没有添加一行代码。同一个空白应用程序在另一个运行 Visual Studio 2010 Ultimate 的桌面上运行得非常好。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我首先在这里尝试: PerformanceCounters on .NET 4.0 & Windows 7
性能计数器很可能未加载到注册表中,或者至少未正确加载。我知道问题不同,但症状是相同的。
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.
运行 lodctr.exe /r 它将修复与 perfmon 计数器相关的注册表项。
Run
lodctr.exe /r
it will repair registry entries related to the perfmon counters.