Skip to content
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

Repo local issue: msbuild non-deterministically fails to build #11100

Closed
ViktorHofer opened this issue Dec 6, 2024 · 2 comments
Closed

Repo local issue: msbuild non-deterministically fails to build #11100

ViktorHofer opened this issue Dec 6, 2024 · 2 comments

Comments

@ViktorHofer
Copy link
Member

ViktorHofer commented Dec 6, 2024

      Microsoft.Build -> D:\a\_work\1\vmr\src\msbuild\artifacts\bin\Microsoft.Build\Release\net472\Microsoft.Build.dll
    D:\a\_work\1\vmr\.dotnet\sdk\10.0.100-alpha.1.24555.54\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error : The process cannot access the file 'D:\a\_work\1\vmr\src\msbuild\artifacts\obj\Microsoft.Build.Framework\Release\Microsoft.Build.Framework.17.13.0-ci-24606-01.nuspec' because it is being used by another process. [D:\a\_work\1\vmr\src\msbuild\src\Framework\Microsoft.Build.Framework.csproj::TargetFramework=net472]
##[error].dotnet\sdk\10.0.100-alpha.1.24555.54\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) The process cannot access the file 'D:\a\_work\1\vmr\src\msbuild\artifacts\obj\Microsoft.Build.Framework\Release\Microsoft.Build.Framework.17.13.0-ci-24606-01.nuspec' because it is being used by another process.
      Successfully created package 'D:\a\_work\1\vmr\src\msbuild\artifacts\bin\Microsoft.Build.BuildCheck.UnitTests\CustomChecks\Microsoft.Build.Framework.17.13.0-ci-24606-01.nupkg'.
    D:\a\_work\1\vmr\.dotnet\sdk\10.0.100-alpha.1.24555.54\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error : The process cannot access the file 'D:\a\_work\1\vmr\src\msbuild\artifacts\bin\Microsoft.Build.BuildCheck.UnitTests\CustomChecks\Microsoft.Build.17.13.0-ci-24606-01.nupkg' because it is being used by another process. [D:\a\_work\1\vmr\src\msbuild\src\Build\Microsoft.Build.csproj::TargetFramework=net9.0]
##[error].dotnet\sdk\10.0.100-alpha.1.24555.54\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) The process cannot access the file 'D:\a\_work\1\vmr\src\msbuild\artifacts\bin\Microsoft.Build.BuildCheck.UnitTests\CustomChecks\Microsoft.Build.17.13.0-ci-24606-01.nupkg' because it is being used by another process.
      Successfully created package 'D:\a\_work\1\vmr\src\msbuild\artifacts\bin\Microsoft.Build.BuildCheck.UnitTests\CustomChecks\Microsoft.Build.17.13.0-ci-24606-01.nupkg'.

from https://dev.azure.com/dnceng-public/public/_build/results?buildId=887994&view=logs&j=af161a59-3ba0-595e-b1dd-589f209b7277&t=169bd431-100e-5e1f-71a2-8f0b618112dd&l=320

Looks like Microsoft.Build packages are created in parallel multiple times (the CustomChecks unit tests seem to create the packages again).

This caused the VMR build to fail.

@ViktorHofer
Copy link
Member Author

ViktorHofer commented Dec 6, 2024

@mmitche here's another case of a project that shouldn't even build inside the VMR by default (test) but its target still runs:

<Target Name="AddGeneratedFile" BeforeTargets="BeforeCompile;CoreCompile" Inputs="$(MSBuildAllProjects)" Outputs="$(IntermediateOutputPath)BuildCheckUnitTestsConstants.cs">

That's because the SuppressAllTargets / ExcludeFrom* infrastructure can handle scenarios when there's a BeforeTargets / AfterTargets hook defined.

@YuliiaKovalova
Copy link
Member

I close it as a dupe of #11090

@YuliiaKovalova YuliiaKovalova closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
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

No branches or pull requests

2 participants