Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012 The project file "" has been renamed or is no longer in the solution

I recently upgraded my IDE, but not my compiler from VS2010 to VS2012 and now I'm having issues with one of my solutions. When I try to build it I get below message.

The project file has been renamed or is no longer in the solution

And when I try to build the individual projects I get below message

A build is already in progress

I've tried removing and re-adding all the projects, but that doesn't help. I even created a brand new solution with all the same projects, but when I tried to build I got the same errors as with the original solution.

I've read that lot of people have similar problems to this, but none of their solutions have helped me so far.

One suggestion was to see if any projects had any missing reference but I'm not entirely sure how to go about doing that.

I tried removing the references and re-adding them but every time I tried to re-add them I got the same error "The project file '' has been renamed or is no longer in the solution"

Any help or suggestions would be awesome!

like image 800
nastassiar Avatar asked Jan 28 '13 23:01

nastassiar


6 Answers

I had the same problem, and solved it by making sure that every project referenced by other projects were included in the solution.

Right-click on the first project, choose References... and make sure every project listed under References are included. Go to the next and do the same.

That solved my problem with "The Project file '' has been renamed or is no longer in the solution". Not sure about the problem with "A build is already in progress".

like image 106
Arve Hansen Avatar answered Nov 17 '22 10:11

Arve Hansen


I can confirm the_mantrill's scenario. (Posting as an answer, because this wouldn't fit in a comment.)

In my solution, Project A references Project B. For some reason, Project B's Project GUID changed. (I know this can happen, I didn't investigate what caused it in our case.) The solution file had the correct new GUID for Project B, but in Project A's project file, the reference to Project B still had the old GUID.

By unloading and reloading projects in the Solution Explorer, I found that Project A caused "The project file '' has been renamed or is no longer in the solution." Once found, manually updating the Project B's GUID in Project A's project file fixed the problem.

Details:

ProjectB.vcxproj

<PropertyGroup Label="Globals">
    <Keyword>Win32Proj</Keyword>
    <ProjectGuid>{9CF2493A-0C79-88E7-12ED-7DFAEBA8535B}</ProjectGuid>
</PropertyGroup>

At some point in the past, ProjectB's ProjectGuid used to be {d6f1934a-905f-77ca-49c0-164b2171a0f6}. It's now {9CF2493A-0C79-88E7-12ED-7DFAEBA8535B}.

ProjectA.vcxproj – before, causes "The project file '' has been renamed or is no longer in the solution."

<ItemGroup>
    <ProjectReference Include="..\ProjectB\ProjectB.vcxproj">
        <Project>{d6f1934a-905f-77ca-49c0-164b2171a0f6}</Project>
    </ProjectReference>
    :
</ItemGroup>

ProjectA.vcxproj – after manual editing, now works:

<ItemGroup>
    <ProjectReference Include="..\ProjectB\ProjectB.vcxproj">
        <Project>{9CF2493A-0C79-88E7-12ED-7DFAEBA8535B}</Project>
    </ProjectReference>
    :
</ItemGroup>
like image 9
Dan K Avatar answered Nov 17 '22 08:11

Dan K


The problem seemed to occur for me when I had two solution files for different products, but which had several projects in common. These were VS2010 projects that I was opening for the first time in VS2012. When opening the first one all the projects were converted. The problem then arose when loading the second one as some of the projects had already been converted. It seemed to be the project references had been updated in the first solution, but then for the second solution it had to deal with updating some projects but using the already-updated versions of the common projects.

In the end, to solve it I had to remove and then re-add a couple of projects (and the project references) and that seemed to sort it out. It's also worth removing the build folders and the other temporary files (such as .suo) as the state of some of those files affected the project references problem (which I really didn't expect).

like image 2
the_mandrill Avatar answered Nov 17 '22 08:11

the_mandrill


delete the .suo and reload worked for me after moving from VSO to onsite TFS had some issues

The project file has been moved renamed or not on your computer

like image 2
WeisserHund Avatar answered Nov 17 '22 10:11

WeisserHund


This problem is normally caused by the project version converter.

The deal is that a Referenced project into a project in the solution isn't any longer in the solution (As I said, the cause is a problem in the conversion or manual delete).

So you had to see all projects references (Right click on the project -> "References...") and check that every referenced project exist in the solution - otherwise add the missing project to the solution or remove the invalid modifier.

This awnser is based over an existing awnser: https://stackoverflow.com/a/14722733/1107020

like image 2
Marcos Eusebi Avatar answered Nov 17 '22 10:11

Marcos Eusebi


Exactly once, at first I did not believe the measures "make sure all the references there" was successful.

Finally I try to check all projects, especially web project in solution I, Seriously there are unavailable. I delete the reference and voila, it works!

like image 1
livan afryanto Avatar answered Nov 17 '22 10:11

livan afryanto