XCode 15 deleting packages.resolved

So I am running into a very strange issue. Xcode is deleting the Package.resolved file after every build, resulting in having to manually Reset Package caches after every build/run/test.

Extremely annoying, any idea why this is happening?

Post not yet marked as solved Up vote post of janniet Down vote post of janniet
442 views

Replies

Same here. I've spent literally 10+ hours trying all sorts of things to resolve but no luck.

Same here. Any idea how to solve it?

agvtool seems to be the culprit. If I comment out its call in my pre-action script in the "Build" step in my scheme, the problem no longer occurs for me.

This does seem to be the cause. Any tips on increasing the build number without breaking packages?

I've moved my build bump script to the archive section of the scheme so that it only does it on archive vs building now. Not sure if that helps anyone but it reduces the number of times I've had to reset the package caches (for now).

Anyone found a solution to this? I run into this problem everytime I switch git branches while Xcode is open. And after I added agvtool to my build phase, it happens on each build. It is so annoying.