Description
this build has some failures in the Razor build because of a file copy. From looking at the code and binlong, Daniel and I think it's because that csproj multi-targets AND has a copy step that copies to the same folder.
So the two different framework builds run in parallel but that copy step overwrites (sometimes locking the files based on timing).
Fix options
Copy the files into a TFM specific folder
Only do the copy in one of the TFM legs (you'd need to determine if the other TFM would require those files to be present)
Failure details
D:\a\1\s\src\RazorSdk\Tasks\Microsoft.NET.Sdk.Razor.Tasks.csproj(107,5): error MSB3026: Could not copy "D:\a\1\s\src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.Component.targets" to "D:\a\1\s\artifacts\bin\Debug\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.Component.targets". Beginning retry 1 in 1000ms. The process cannot access the file 'D:\a\1\s\artifacts\bin\Debug\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.Component.targets' because it is being used by another process. [TargetFramework=net7.0]
##[error]src\RazorSdk\Tasks\Microsoft.NET.Sdk.Razor.Tasks.csproj(107,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "D:\a\1\s\src\RazorSdk\Targets\Microsoft.NET.Sdk.Razor.Component.targets" to "D:\a\1\s\artifacts\bin\Debug\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.Component.targets". Beginning retry 1 in 1000ms. The process cannot access the file 'D:\a\1\s\artifacts\bin\Debug\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.Component.targets' because it is being used by another process.
Activity