Publish Database Project causing “the script file could not be found”

If you come across publishing a SQL databse from a Visual Studio Database Project that the “the script file could not be found”, after a lot of digging around I found that all you need to do is delete the .dbmdl file, and it will publish again.