Reply from Microsoft support team "Thanks for the update. I was afraid of that, since my testing found similar results. It seems there is some internal WPF tracing code which does not adhere to the specified settings. In the meantime, We don’t have any suggestions other than finding the Resource Dictionary (or the relevant type) and correcting the issues that the trace output is warning about.
if a debugger was attached, there will always be some WPF tracing emitted regardless of the settings specified in the IDE (or in the app.config). Unfortunately, the output you are receiving appears to fall into this category. Regrettably, there is no way to turn off all the WPF trace output from being emitted
We could certainly file a feature request for the product for this to be considered in a future release, but otherwise I don’t see a way for you to avoid the issue in the current release.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…