As you are using PB 2022, I guess that with PBautobuild220 you can delete the pbls. They should be recreated (but I never tested, I believe it would because the pbls should not be in your source control for PB 2022)...
Here is the orca script I use in PB 2019 R3 to achieve the same result.
start session
scc set connect property localprojpath "C:\ProjectBuild\PB2019Src\<MY PROJECT>"
;localprojpath must point to the parent directory of ws_objects folder
scc set connect property logfile "C:\ProjectBuild\PB2019Src\<MY PROJECT>\<MY PROJECT>.log"
scc set connect property logappend false
scc set connect property deletetempfiles "true"
scc connect offline
scc set target "C:\ProjectBuild\PB2019Src\<MY PROJECT>\Common\<MY PROJECT>.pbt" "refresh_all importonly"
scc refresh target "full"
scc refresh target "3pass"
scc close
end session
After the above script, I do the compilation using pbc190...
Before running the orca script i have already pulled all changes using Git.
@echo This is part of a Batch File that pulls changes.
:UPDATE
echo "GIT FETCH Changes"
cd C:\ProjectBuild\PB2019Src\%1
git fetch origin master
git checkout origin/master
cd c:\_build
rem pause
echo "GIT FETCH Complete"
goto :ORCA
Depending on how large is your project, the orca script may take some time to complete.
Andreas.
Actually, I didn't bother with opening a bug, I'll wait for 2025.
In the mean time, I committed the PBL and went on with my day.
Have a great day