You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTML logger sometimes shows error when using multiple vstest runner in parallel #15404
When one process finishes it seems to have a temporary xml result file: "TestResult_USERNAME_MACHINENAME_DATETIMESTAMP.xml"
If two processes finish in the same second then they try to use the same xml file. Because the temporary filename date time stamp is only accurate by seconds. That leads to access violation file is already used by another process.
Current Result: The html file is not created from xml file Expected Result: The html file is created from xml file
If running multiple processes the line 353 lock (FileCreateLockObject) will not hold.
And so multiple processes can pass line 355 if (!File.Exists(fullFilePath)) concurrently.
So multiple processes successfully pass line 357 using var _ = File.Create(fullFilePath)
where 1st process creates the file and 2nd process overwrites the same file
=> this is the error scenario
Activity
MihuBot commentedon Feb 17, 2026
I'm a bot. Here is a possible duplicate issue (I may be wrong):
informatorius commentedon Feb 17, 2026
Solutions could be:
https://github.com/microsoft/vstest/blob/90ee608c51f07da7e6b7988b693d5e1a9d33f7a5/src/Microsoft.TestPlatform.Extensions.HtmlLogger/HtmlLogger.cs
If running multiple processes the line 353 lock (FileCreateLockObject) will not hold.
And so multiple processes can pass line 355 if (!File.Exists(fullFilePath)) concurrently.
So multiple processes successfully pass line 357 using var _ = File.Create(fullFilePath)
where 1st process creates the file and 2nd process overwrites the same file
=> this is the error scenario
Fix HTML logger parallel file collision (microsoft#15404)
Fix HTML logger parallel file collision (#15404)
Fix HTML logger parallel file collision with atomic file creation
Fix HTML logger parallel file collision with atomic file creation
Fix HTML logger parallel file collision with atomic file creation (mi…
[fix] Fix HTML logger parallel file collision (#15435)