In #13576, the test Microsoft.Build.UnitTests.FileLogger_Tests.DistributedFileLoggerParameters failed with the error
Microsoft.Build.Framework.LoggerException : Failed to write to log file "msbuild0.log". The process cannot access the file 'D:\a_work\1\s\artifacts\bin\Microsoft.Build.Engine.UnitTests\Release\net472\msbuild0.log' because it is being used by another process.
at Microsoft.Build.Logging.FileLogger.InitializeFileLogger(IEventSource eventSource, Int32 nodeCount) in /_/src/Build/Logging/FileLogger.cs:line 128
at Microsoft.Build.Logging.FileLogger.Initialize(IEventSource eventSource, Int32 nodeCount) in /_/src/Build/Logging/FileLogger.cs:line 137
at Microsoft.Build.Logging.DistributedFileLogger.Initialize(IEventSource eventSource) in /_/src/Build/Logging/DistributedLoggers/DistributedFileLogger.cs:line 129
at Microsoft.Build.UnitTests.FileLogger_Tests.DistributedFileLoggerParameters() in D:\a\_work\1\s\src\Build.UnitTests\FileLogger_Tests.cs:line 489
I think the absolute path being in the test bin folder is a tell about what's wrong--it should use a folder in TEMP via TestEnvironment.
In #13576, the test
Microsoft.Build.UnitTests.FileLogger_Tests.DistributedFileLoggerParametersfailed with the errorI think the absolute path being in the test
binfolder is a tell about what's wrong--it should use a folder in TEMP viaTestEnvironment.