After this change, I only see it once. I don't understand why SetTargetFramework was needed in the first place in https://github.com/dotnet/linker/pull/1891#discussion_r593494437, but it no longer seems necessary. Probably the recent changes to the cecil build (arcade onboarding) caused this to become a problem.
I have been able to build locally >100 times in a row with this change, without hitting the race, so I think this fixes it. Previously I was seeing it fail about one in ten builds locally.
This is an attempt to fix a race condition in our build, where Mono.Cecil was being built twice into the same output path. See https://github.com/dotnet/installer/pull/15228#issuecomment-1381987801 for context.
Before this change, I saw this line twice in the output:
After this change, I only see it once. I don't understand why
SetTargetFramework
was needed in the first place in https://github.com/dotnet/linker/pull/1891#discussion_r593494437, but it no longer seems necessary. Probably the recent changes to the cecil build (arcade onboarding) caused this to become a problem.I have been able to build locally >100 times in a row with this change, without hitting the race, so I think this fixes it. Previously I was seeing it fail about one in ten builds locally.