c# - 无法在 Windows 应用商店应用程序中使用 Trace.WriteLine

标签 c# windows-8 windows-store-apps trace

在 Windows 应用商店应用程序中我可以使用:

System.Diagnostics.Debug.WriteLine("Test");

但是将 Debug 替换为 Trace 会出现以下错误:CS0103: The name 'Trace' does not exist in the current context How can我解决这个问题?

最佳答案

WinRT 没有 Trace,也缺少跟踪监听器。 Debug.WriteLine 是您在不求助于 metrolog 等第三方的情况下所能做的最好的事情。 .

关于c# - 无法在 Windows 应用商店应用程序中使用 Trace.WriteLine,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16522664/

相关文章:

c# - XAML - 用于简单自定义控件的简单动画

xaml - UWP 应用程序的 XAML 中具有RelativePanel 的 UI 元素的相对宽度

c# - 如何从 C# winform 正确关闭屏幕键盘进程?

c# - 在自定义 ITemplate 中查找控件

javascript - 解析 html 字符串 Windows 8 javascript 应用程序

c# - PointerPressed 在左键单击时不起作用

c# - 从用户输入中读取一个整数

c# - 如何在 C# 中实例化具有抽象约束的泛型类

windows-8 - WinRT 广告替代 Microsoft Pubcenter

windows-store-apps - Microsoft Intune - 无法添加设备