Search code examples
xcodeswift-package-manager

"the Package.resolved file is most likely severely out-of-date and is preventing correct resolution"


I'm getting the following error when trying to build. It shows up as the only item in the build log, too.

Package Loading: the Package.resolved file is most likely severely out-of-date and is preventing correct resolution; delete the resolved file and try again

Here are the packages I'm using:

5 Swift packages listed in the project settings: SimpleLogging, OptionalTools, FunctionTools, SpecialString, and Swift-TODO. The first 3 are URLs to git files (they end in .git), and the last 2 are URLs to the repos themselves (they end in a slash).The same 5 packages as above, but listed in the sidebar, proving they were resolved successfully.


Solution

  • For me, it turned out that, even though Xcode was able to resolve and clone these packages, it didn't like that 2 of them pointed to the GitHub repo page, rather than the git file version.

    Changing them so they're all .git URLs fixed it:

    The same project package list as above, but none end in a slash; all end in .git