Is it necessary to have the project name identical to the name of the directory that contains the .project file?
Yes, it has to be located in the folder with the same name as the project.