diff --git a/src/Tools/dotnet-stack/ReportCommand.cs b/src/Tools/dotnet-stack/ReportCommand.cs index 1a1b4dcae8..f8eafe2689 100644 --- a/src/Tools/dotnet-stack/ReportCommand.cs +++ b/src/Tools/dotnet-stack/ReportCommand.cs @@ -38,7 +38,7 @@ internal static class ReportCommandHandler /// private static async Task Report(CancellationToken ct, IConsole console, int processId, string name, TimeSpan duration) { - string tempNetTraceFilename = Path.GetRandomFileName() + ".nettrace"; + string tempNetTraceFilename = Path.Join(Path.GetTempPath(), Path.GetRandomFileName() + ".nettrace"); string tempEtlxFilename = ""; try