That error does not make me think you have the latest code, doesn't even sound like recent code. I cannot produce the problem you describe, it publishes fine for me in both Debug and Release mode.
Please tell the exact steps you used to get the code?
Note that if you had cloned the repository a while back and then if you pull changes, that does not give you the latest code, you have to then run the update command on your local copy of the repository to apply the changes to your working copy. After your working copy is updated you should rebuild the solution again and then visit the /Setup/Default.aspx page. You should always use Release builds when publishing.
If you have the latest code, your build configuration dropdown should appear as in this blog post.
Though the appearance of the dropdown does not indicate it is the very latest code, since the dropdown has been the same since July, but if it does not look the same then it clearly indicates older source code.
Hope it helps,