Why not put the spray foam first, and then frame the wall?
There are 4 basic reasons:
- The spray foam would create a mess on the floor which you would need to clean before you install the wall
- The spray foam if in place first may stick out further that the 1/2 inch gap needed, hence, make installing the wall a real pain
- We would like to seal all the gaps behind the wall studs, and any awkward spaces your framing causes at the corners - you can only do this if the wall is in place.