Skip to content

[MAUI] MacCatalyst parallel build issue #17497

@jonathanpeppers

Description

@jonathanpeppers

Steps to Reproduce

  1. Build dotnet/maui's repo, namely for MacCatalyst
  2. Sometimes you get errors about .pdb files such as:
Errors
    /Users/builder/azdo/_work/2/s/bin/dotnet/sdk/7.0.102/Microsoft.Common.CurrentVersion.targets(4752,5): error MSB3027: Could not copy "obj/Release/net7.0-maccatalyst/Microsoft.Maui.pdb" to "bin/Release/net7.0-maccatalyst/Microsoft.Maui.pdb". Exceeded retry count of 10. Failed.  [/Users/builder/azdo/_work/2/s/src/Core/src/Core.csproj]
    /Users/builder/azdo/_work/2/s/bin/dotnet/sdk/7.0.102/Microsoft.Common.CurrentVersion.targets(4752,5): error MSB3021: Unable to copy file "obj/Release/net7.0-maccatalyst/Microsoft.Maui.pdb" to "bin/Release/net7.0-maccatalyst/Microsoft.Maui.pdb". The process cannot access the file '/Users/builder/azdo/_work/2/s/src/Core/src/bin/Release/net7.0-maccatalyst/Microsoft.Maui.pdb' because it is being used by another process. [/Users/builder/azdo/_work/2/s/src/Core/src/Core.csproj]

I think this occurs if you have multiple MacCatalyst app projects in a solution and build them. I think it might have been introduced when RuntimeIdentifiers=maccatalyst-x64;maccatalyst-arm64 became the default? But also might be combination of some change in the .NET SDK or MSBuild.

The workaround is either:

  • Build .sln files with -m:1
  • Build with -r maccatalyst-x64

This is what I did for now:

dotnet/maui@440fd19#diff-74e588eb60cf3c891901dd5657c29e2b0b0b1e605a91d5f04220301ff4a5295bR14

Expected Behavior

No build errors.

Actual Behavior

Got a build error.

Environment

This was the versions from dotnet/maui#13201

Build Logs

Too large for GitHub:

https://microsoft-my.sharepoint.com/:u:/p/jopepper/EY6Tj2IrVkxGiVeOjABGqCsBrSnSwAtaxE72O_Fy8RV8YQ?e=XCPawx

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIf an issue is a bug or a pull request a bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions