Tools -> Project and Solutions -> Build and Run -> Before building: 1. Prompt to save all changes. 2. Save all. 3. Don't save.