-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSBuild race to write portable assembly attributes file #10116
Comments
@jaredpar Do we need a bug over on MSBuild for this? |
@jasonmalinowski has this come up again recently? |
@jaredpar No, just digging through ancient infrastructure bugs. |
I'm having trouble tracking down where this behavior comes from. I dug through the MSBuild source and couldn't find anything relevant. It happens as a part of the portable targets in this specific bug so it's possible it's there. Either way there should be a safe way of doing this (safe as in no warning). |
MSBuild generates the TargetFrameworkAttribute file to the same path on disk for equivalent combinations of TargetFrameworkIdentifier and TargetProfile. This means if two projects in a solution have equivalent identifiers, their builds will race to write the same file to disk. This is safe by virtue that the content of the file is the same in both cases. Hence it doesn't really matter who wins the race, both projects see the same output. This is frustrating though because even though it's safe, MSBuild still isssue a warning when it happens. This breaks our desire to have warning free builds. To fix this we will instead generate the file to the Obj\ProjectName directory. This means every project gets their own indepnedent copy of the file, eliminating the race. closes dotnet#10116
Many of our builds are failing with the following:
This is a race condition in MSBuild writing out the temporary files which was previously won't fixed. This is causing build breaks as we are promoting this to an error. For now leaving this as a warning that we ignore.
Root cause: http://vstfdevdiv:8080/DevDiv2/DevDiv/_workItems?id=403105&_a=edit
The text was updated successfully, but these errors were encountered: