Xcode Build service error due multiple references with the same GUID

Since updating to macOS Sonoma 14.1 and Xcode 15.0.1 I get the following error message: Build service could not create build operation: unable to load transferred PIF: The workspace contains multiple references with the same GUID 'PACKAGE:1YUBE3S3A43QP92YAIBS0U5OJYK9I2OP2::MAINGROUP'

I do not know how to solve this problem. Even a fresh install of macOS Sonoma does not work.

Getting the same error in xcode as well including package missing resolving it through clearing deriveddata doesn't help followed by restart and clearing cache

Multiple commands produce 'some aws.json at given path' it was a running project.

I solved the issue by reseting the package cashes go to Xcode in File/Packages/Reset Package Cashes

I am getting this error oo when running on Xcode 16.0. Still looking for the solution till now 👀

Same issue Resting/Resolving packages Restarted Mac multiple times Restarted Xcode Deleted driver data Readded the package

Nothing helped!

Same here, On a top of all other previously mentioned tricks I also tried to delete ~/Library/Caches/org.swift.swiftpm as well, but nothing happens.

It starts happening when I switch to different branch in git and only way to make it work is to reinstall Xcode.

I found solution! It seam that SourceTree update introduce new line in .gitconfig file so getting rid if it makes this problem disappear: https://jira.atlassian.com/browse/SRCTREE-8176

Just delete

[safe]
    bareRepository = explicit 

from ~/.gitconfig And SMP will start working again!

For more context on this issue, I have been running into this every time I attempt to change branches using Git. A band-aid solution to this problem is to:

  1. Quit Xcode and reopen.
  2. In the project packages, select the option to "Resolve Package Versions"

However, I am looking for a more concrete solution to this problem so I don't have to do these actions every time I checkout a new branch.

Thanks.

same error,how to fix?

Xcode Build service error due multiple references with the same GUID
 
 
Q