Description
When running dotnet test solution.sln --logger:`"html;LogFilePrefix=<absolutepath>/tests/html/tests_results
on a solution with multiple test projects I frequently get an error like this:
Html Logger Error : The process cannot access the file 'C:\git\project\artifacts\support\tests\tests\html\tests_results_net8.0_20250522131609.html' because it is being used by another process.
It seems multiple dotnet.exe are used to execute tests in parallel and some end up with the same timestamp in the filename
Process monitor shows the SHARING_VIOLATION occurs when a second dotnet.exe process tries to create a file during the same second as the first entry in the screenshot.
Not shown: actually there are 4 dotnet exe's all trying to create the same file but I filtered the other 2 out for simplicity.
Seems that timestemp should be extended to include fractional seconds? Or better yet use the assembly name of the test project in the filename too? Nunit supports {assembly} and {framework} substitutions in its filename parameter which is nice but that would be more helpful in the LogFileName parameter of HTML logger.