The project description file (.project) for my project is missing
Asked Answered
M

15

82

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.

Moneybags answered 7/10, 2009 at 13:6 Comment(3)
May be a stupid question, but are you sure that you are using the same workspace each time? Have you tried creating and using a different workspace to see if the problem persists?Espinoza
Each project has an individual workspace. When I create a project, I choose the existing path.Moneybags
Was getting this error with gradle because of using cleanEclipse instead of just clean.Herein
F
103

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 differ. 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.

Fluorspar answered 27/6, 2013 at 12:34 Comment(3)
It's much easier to remove the project (WITHOUT DELETING CONTENT ON DISK) from Eclipse and then import it again. Another thing is that i don't have a .location file for my project in in the specified directory (Eclipse 4.3)Flyte
instead of delete, open the file in notepad and correct the path. worked for meAdamsite
I tried (Version: 2023-09 (4.29.0)) simply editing the files but it brought my sub-projects up to the main project level which doesn't work for me. So just deleted them (without deleting files) and re-imported. Mine had happened because I had used Git to download a second copy of the same project set to a very old branch and then imported both versions into Eclipse. This must have messed things up in Eclipse.Glutelin
G
14

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.

Gambol answered 18/5, 2012 at 19:1 Comment(2)
I follow up your steps, just close the project and delete from the workspace then reimport the project it will be fixed.Farriery
@Ahmed Salem -- this indeeed does work, thanks. I can hardly help commenting that this doesn't speak very well of Eclipse itself, however. What a horrible 'bug' ....Mondrian
D
2

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.

Declinatory answered 10/12, 2009 at 17:18 Comment(0)
G
2

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

Generate answered 16/5, 2011 at 17:58 Comment(0)
M
1

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.

Milda answered 10/3, 2010 at 15:59 Comment(0)
B
1

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.

Bland answered 9/8, 2010 at 21:37 Comment(0)
P
0
<?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.

Pierian answered 8/10, 2014 at 10:12 Comment(0)
C
0

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 
Caswell answered 18/8, 2018 at 22:15 Comment(1)
for me, with Eclipse Version 2021-12, this file was under <workspacefolder>/.metadata/.plugins/org.eclipse.core.resources/.projects/<projectname>/.locationOceanid
D
0

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.

Daphene answered 22/12, 2018 at 14:42 Comment(0)
E
0

I created a new workspace and imported old projects. I just didn’t open this workspace for a long time, I don’t know why this problem happened

Elihu answered 20/7, 2020 at 10:6 Comment(0)
I
0

In my case it happened cause I accidentally removed eclipse metadata files. So I fixed it by removing the project from eclipse, but without deleting files from disck. And then reimport.

Igneous answered 6/1, 2023 at 17:46 Comment(0)
G
0

For ubuntu users..... If all projects that you created in Eclipse is found missing due to unusual shutdown, what i have done during such a situation is hereby sharing with you guys... just switching the eclipse workspace, that's all...

Steps:

1.Open Files--->Create a new folder "eclipse workspace1". 2.Files--->Go to "Eclipse workspace" where all your missing project codes are saved. 3.copy all your eclipse files into "eclipse workspace1". 4.open Eclipse 5.File--->Switch workspace--->other---Browse "eclipse workspace1"--->open 6.eclipse will restart... 7.click on "import"--->go to the new workspace("eclipse workspace1")-->Finish

Glasser answered 21/3, 2023 at 4:58 Comment(0)
B
0

This problem happens when .project file of the project or modules of the project has been displaced or placed in any other location. I have faced this problem in various versions of eclipse (eg. 06-2020, etc.) Please find below solution which is easy and does not need long time (deletion, check out, etc.)

Error - Errors occurred while refreshing resources with the local file system. The project description file (.project) for 'project-one' is missing. This file contains important information about the project. The project will not function properly until this file is restored. The project description file (.project) for 'project-one' is missing. This file contains important information about the project. The project will not function properly until this file is restored.

Resolution - Right click on module or the project "project-one" for which the error occured. Replace With --> Latest from repository.

The error has gone away.

Boylan answered 27/3, 2023 at 12:27 Comment(0)
T
-1

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
Thinia answered 22/9, 2014 at 21:10 Comment(0)
S
-2

It worked for me after I created and switched to a new workspace and copied my codebase there.

Spin answered 1/6, 2021 at 7:43 Comment(1)
It's not answer you should comment your review, on the answer that worked for you.Locomotor

© 2022 - 2024 — McMap. All rights reserved.