Search code examples
c#windows-8windows-store-appstrace

Cannot use Trace.WriteLine in Windows Store App


In Windows Store application I can use:

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

But replacing Debug with Trace gives the following error: CS0103: The name 'Trace' does not exist in the current context How can I fix this?


Solution

  • WinRT doesn't have Trace, and it lacks trace listeners. Debug.WriteLine is the best you can do without resorting to something 3rd party like metrolog.