From 61505b88a558be83bd2112f4a97954cbb1d1ce7f Mon Sep 17 00:00:00 2001 From: Jass Bagga Date: Wed, 28 Jun 2017 12:11:17 -0700 Subject: [PATCH] Remove use of GetTempFileName (#313) --- .../Internal/MsBuildFileSetFactory.cs | 4 ++-- .../Internal/ProjectIdResolver.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.DotNet.Watcher.Tools/Internal/MsBuildFileSetFactory.cs b/src/Microsoft.DotNet.Watcher.Tools/Internal/MsBuildFileSetFactory.cs index 1c778101db..01b8f4a996 100644 --- a/src/Microsoft.DotNet.Watcher.Tools/Internal/MsBuildFileSetFactory.cs +++ b/src/Microsoft.DotNet.Watcher.Tools/Internal/MsBuildFileSetFactory.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -71,7 +71,7 @@ namespace Microsoft.DotNet.Watcher.Internal { EnsureInitialized(); - var watchList = Path.GetTempFileName(); + var watchList = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); try { var projectDir = Path.GetDirectoryName(_projectFile); diff --git a/src/Microsoft.Extensions.SecretManager.Tools/Internal/ProjectIdResolver.cs b/src/Microsoft.Extensions.SecretManager.Tools/Internal/ProjectIdResolver.cs index 83fdde4463..cf3105cea2 100644 --- a/src/Microsoft.Extensions.SecretManager.Tools/Internal/ProjectIdResolver.cs +++ b/src/Microsoft.Extensions.SecretManager.Tools/Internal/ProjectIdResolver.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -34,7 +34,7 @@ namespace Microsoft.Extensions.SecretManager.Tools.Internal ? configuration : DefaultConfig; - var outputFile = Path.GetTempFileName(); + var outputFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); try { var args = new[]