Edit your Project Settings. In "build", set the base SDK to "iPhone Device 4.0". Then edit your active target settings to make sure they don't override your choice of base SDK.
Use the new XCODE. The reason it says "Base SDK missing" is that your project settings specify a base SDK that is no longer included in XCODE. Once you change your project settings to specify iOS 4.0, it will no longer say "Base SDK missing".