Just to clarify. After deleting those folders you can close everything, then open Unreal Editor again and it will tell you that it will rebuild all the files missing. It generates the solution too. And the build button will be there again and the c++ classes you added and were not showing up in the list too.