xaml-math icon indicating copy to clipboard operation
xaml-math copied to clipboard

Test failures on CI: The process cannot access the file `XamlMath.Shared.net462.tmp.cs` because it is being used by another process

Open ForNeVeR opened this issue 6 months ago • 0 comments

For example, see this one: https://github.com/ForNeVeR/xaml-math/actions/runs/7221886895/job/19694965151?pr=480

D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018: System.IO.IOException: The process cannot access the file 'D:\a\xaml-math\xaml-math\api\XamlMath.Shared.net462.tmp.cs' because it is being used by another process.
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at System.IO.File.CreateText(String path)
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at Microsoft.DotNet.GenAPI.GenAPITask.GetOutput(String outFilePath, String filename) in /_/src/Microsoft.DotNet.GenAPI/GenAPITask.cs:line 293
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at Microsoft.DotNet.GenAPI.GenAPITask.Execute() in /_/src/Microsoft.DotNet.GenAPI/GenAPITask.cs:line 233
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
D:\a\xaml-math\xaml-math\src\WpfMath.ApiTest\WpfMath.ApiTest.csproj(38,9): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

I wonder could we write the same file from two different build/test steps or what.

ForNeVeR avatar Dec 15 '23 21:12 ForNeVeR