Use temporary path for fake deps.json in test
(cherry picked from commit 796b4a06e7
)
This commit is contained in:
parent
cc8fe368f8
commit
e59fd7af46
1 changed files with 2 additions and 8 deletions
|
@ -266,14 +266,8 @@ namespace Microsoft.DotNet.Tests
|
||||||
|
|
||||||
var lockFile = new LockFileFormat().Read(lockFilePath);
|
var lockFile = new LockFileFormat().Read(lockFilePath);
|
||||||
|
|
||||||
var depsJsonFile = Path.Combine(
|
// NOTE: We must not use the real deps.json path here as it will interfere with tests running in parallel.
|
||||||
Path.GetDirectoryName(lockFilePath),
|
var depsJsonFile = Path.GetTempFileName();
|
||||||
"dotnet-portable.deps.json");
|
|
||||||
|
|
||||||
if (File.Exists(depsJsonFile))
|
|
||||||
{
|
|
||||||
File.Delete(depsJsonFile);
|
|
||||||
}
|
|
||||||
File.WriteAllText(depsJsonFile, "temp");
|
File.WriteAllText(depsJsonFile, "temp");
|
||||||
|
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
Loading…
Reference in a new issue