Skip to content

Conversation

@baronfel
Copy link
Member

@baronfel baronfel commented Sep 4, 2025

We get the following callstack on several of our single-file publishing tests:

Microsoft.NET.Publish.targets(1132,5): error MSB4018: The "GenerateBundle" task failed unexpectedly. 
Microsoft.NET.Publish.targets(1132,5): error MSB4018: System.IO.IOException: The process cannot access the file '/private/tmp/helix/working/B98A09DE/t/dotnetSdkTests.lUYZADv9/It_can_disabl---A27CFE0E/CetCompat/obj/Debug/net10.0/win-x64/singlefilehost.exe' because it is being used by another process. 
Microsoft.NET.Publish.targets(1132,5): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Int64& fileLength, UnixFileMode& filePermissions) 
Microsoft.NET.Publish.targets(1132,5): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException) 
Microsoft.NET.Publish.targets(1132,5): error MSB4018:    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) 
Microsoft.NET.Publish.targets(1132,5): error MSB4018:    at System.IO.File.OpenRead(String path) 
Microsoft.NET.Publish.targets(1132,5): error MSB4018:    at Microsoft.NET.HostModel.Bundle.Bundler.GenerateBundle(IReadOnlyList`1 fileSpecs) 
Microsoft.NET.Publish.targets(1132,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateBundle.ExecuteCore() in /_/src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs:line 81 
Microsoft.NET.Publish.targets(1132,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 36 
Microsoft.NET.Publish.targets(1132,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() 
Microsoft.NET.Publish.targets(1132,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

we think this could be defender, so we want to put a bit of jitter and retry around this Task to see if that smooths things out.

@baronfel baronfel requested a review from a team September 4, 2025 21:24
@baronfel baronfel merged commit 47d01c7 into dotnet:release/10.0.1xx Sep 4, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants