The project description file (.project) for my project is missing

我怕爱的太早我们不能终老 提交于 2020-05-09 18:14:51

问题


I am using Eclipse PDT 3.5 on Vista (32 bit). It works, though eclipse needs admin rights to execute. This annoys me, but I accept it.

But: every now and then (I am not sure, it may even be everytime I want to open a project), I get the error message "The project description file (.project) for my project is missing.".

It is NOT missing, it is in the main folder of the project. It has no special flags set (it is not hidden, nor system file, nor write-protected).

This is for ALL projects I have in my list. The only solution I have found so far is to delete the project from eclipse an re-add it. This is somewhat annoying.

What can I do?

EDIT: The workspaces are on a server volume. Can this be the problem? I used Eclipse 3.3 before, and there it was no problem with the server paths. And the server volume is mapped to a drive letter.


回答1:


I've found this solution by googling. I have just had this problem and it solved it.

My mistake was to put a project in other location out of the workspace, and share this workspace between several computers, where the paths difer. I learned that, when a project is out of workspace, its location is saved in workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/PROJECTNAME/.location

Deleting .location and reimporting the project into workspace solved the issue. Hope this helps.




回答2:


I had the same problem and in my case .project file was also present in the project directory and had correct permissions.

This problem happened to me after I closed and reopened multiple projects quickly one after another and Eclipse tried to rebuild them at the same time.

In my case Eclipse lost .location file in the workspace directory for 2 out of 5 projects: <workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects/<project name>/.location

I've followed instructions on How to get project list if delete .metadata accidentally and imported the project in the workspace manually via File :: Import :: Other :: General :: Existing Projects. After that .location file was created again and Eclipse stopped complaining.




回答3:


I had the same problem, and I haven't gotten that error since I close the project before I close myEclipse and don't tidy up the default location.

My project source and compiled files are outside the default workspace but there are stubb folders created by default by myEclipse in the default workspace. When I setup the project, there are two .project files - one in the default workspace that points to the working dir, and one .project in my chosen directory.




回答4:


If you move the files for whatever reason manually, then Elipse lost the reference and output a missing project file error, but the reason is thaty you move manually the files and Eclipse lost the reference




回答5:


I am using Eclipse 3.5.1 on Ubuntu. After rebooting my machine my projects in PHP Explorer view were giving the warning that the .project file was missing. The problem was that the external directory where my projects are hosted was not mounted on reboot. So I did a mount -a from the command line and the Eclipse recognized the files.




回答6:


If you only want to checkout and you delete the folder from the workspace you also need to delete the reference to it in the Java view. Then it should checkout as if it were checking out for the first time.




回答7:


<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Lynxster</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

in the name tag give the name of the project folder and save this file with .project extension & paste it in the project folder.

this worked for me.




回答8:


In my case i have changed the root folder in which the Eclipse project were stored. I have discovered tha when i have runned :

cat .plugins/org.eclip.resources/.projects/<projectname>/.location 



回答9:


Martin Encountered the same issue with a Minecraft Mod project when I changed the Main folder location. Normally I would open the project like this

This is how my path looked when I started the project

I got the same "The project description file (.project) for my project is missing." Error.

I later found the .project file in the main folder like this.

This is the location where I found the .project file

I found that going eclipse to "File->Open Project from File System or Archive" and navigate to your main project folder with the .project file solved the problem.

My project is already included

This is my first post in here hoping it can help you out, Martin.




回答10:


If you keep a backup of your worskpace folder, then all you need to do is restore the following folder from the backup:

workspace/.metadata/.plugins/org.eclipse.core.resources


来源:https://stackoverflow.com/questions/1531532/the-project-description-file-project-for-my-project-is-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!