WPF Performance Suite Visual Profiler 不起作用
我已经安装了最新的 Windows 7 SDK,其中包含 WPF Performance Profiler。
当我启动应用程序时,Perforator 确实显示一些数据,但 Visual Profiler 不显示任何内容。时间线移动但没有收集数据......
I have installed the latest Windows 7 SDK which contains the WPF Performance Profiler.
Perforator does display some data when I launch my app, but the Visual Profiler does not display anything. The timeline moves but not data is collected ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
试试这个链接
Try this Link
首先检查它是否适用于小型空白 WPF 应用程序。如果它不能与空白 WPF 应用程序一起使用,则可能是已经提到的补丁 (WPF 4 的 WPF 性能分析工具的时区补丁现已推出)。
然而,就我而言,这不是问题。 Visual Profiler 有一个错误,如果它不喜欢主窗口标题栏中的某些字符,则会导致它不显示元素树。
经过数小时的反复试验,我能够追踪到为什么它无法在我们的应用程序上运行(尽管它可以在空白 WPF 应用程序上运行)的根本原因。原因是我们的应用程序的标题栏文本(商标)中有一个特殊字符。如果我们从主窗口标题中消除特殊字符,则在附加可视分析器时元素树会显示良好。我也能够在简单的空白 WPF 应用程序中重现此问题,只需将以下属性放在主窗口上即可:
看起来像是 Visual Profiler 中的错误,以某种方式由特殊字符触发。我没有测试其他特殊字符,但很可能不仅仅是这个。
因此,解决方法是在分析时删除特殊字符,直到他们修复此问题。
First check to see if its working even with a small blank WPF application. If it is not working with a blank WPF app, then it likely is the patch already mentioned (TimeZone patch to WPF Performance Profiling Tools for WPF 4 is now available).
However, in my case that wasn't the issue. Visual Profiler has a bug that causes it not to display the Element tree if it doesn't like some of the characters in its main window title bar.
Through hours of trial and error, I was able to trace the root cause of why it would not work on our application even though it would on a blank WPF application. The reason is that our application has a special character in the title bar text (trademark). If we eliminate the special character from the main window title, the element tree shows fine when the visual profiler is attached. I was able to reproduce this issue in the simple blank WPF application too simply by putting the following property on the main window:
Looks like a bug in Visual Profiler that somehow is triggered by special characters. I didn't test for other special characters, but likely it isn't just this one.
So the workaround is to remove the special character while you are profiling until they fix this.
检查您是否使用的是 WpfPerf 4.0 版本。原来自带的SDK不支持.net 4
Check out if you are using the version 4.0 of WpfPerf. The original that comes with the SDK do not support .net 4