1. Open the project in MS Project.
2. File, Save As, Save As File.
3. When prompted select to save with "All Enterprise Custom Fields".
4. In the file dialog select the Save as type: XML
5. Save the file to your local computer.
6. Once saved, close the project (don't forget to check in!) and reopen the saved XML file, when prompted choose to import `As a new project'.
7. Once opened, select Save As and save the project to the project server using the exact same project name.
8. When prompted say yes to overwrite the existing project (you did check it in right?)
9. Publish and you're done.
10. Use third party software Project Repair Toolbox https://www.repairtoolbox.com/projectrepair.html if previous actions didn't give the result.