-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Target framework attribute file should be written to IntermediateOutputPath #1479
Copy link
Copy link
Closed
Closed
Copy link
Labels
bughelp wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged
Milestone
Description
Currently GenerateTargetFrameworkMonikerAttribute defaults to write the target framework attribute file to %TEMP%. This means if multiple projects are building at once and the file doesn't exist, they can hit a race condition. The currently solution is to have the <WriteLinesToFile /> task marked to ContinueOnError which emits a warning.
I propose that we instead default to have the target framework attribute file be written to the IntermediateOutputPath which in most cases would be unique per project. The overhead on small projects would be very minimal and in large projects they would no longer have the race condition. I would change this line to say:
<TargetFrameworkMonikerAssemblyAttributesPath
Condition="'$(TargetFrameworkMonikerAssemblyAttributesPath)' == ''">
$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))
</TargetFrameworkMonikerAssemblyAttributesPath>FYI @jaredpar
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bughelp wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged