48

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!

2
  • 1
    "One suggestion was to see if any projects had any missing reference but I'm not entirely sure how to go about doing that." - open the references node in each project........ Commented Jan 28, 2013 at 23:56
  • My suggestion is to open up the .SLN file in your favorite text editor and dig around. The format is fairly straight forward. Commented Jan 29, 2013 at 16:41

9 Answers 9

72

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

6
  • 3
    This do fix the problem, but I really hate this problem... The message is not clear, and I personally would prefer to have customized solution including only several projects that I need to work with, it's neat/clean and fast to build
    – Easton L.
    Commented Dec 10, 2013 at 2:40
  • 3
    Is there a way to automate this? I have >100 projects in my solution.
    – Lev
    Commented Apr 9, 2014 at 7:11
  • 7
    OK, found the way. Build it from the command line with msbuild, and the error messages will contain the missing projects.
    – Lev
    Commented Apr 9, 2014 at 12:07
  • In my case, it wasn't project-references but rather I needed to run cmake again because the caches it builds had been deleted. Commented May 12, 2014 at 15:13
  • 1
    I've seen this error when modifying project configurations, even when the solution builds. So if you are able to trigger a build, you can look for warning : The referenced project 'foo.vcxproj' does not exist in the Output window -- this will identify which of your 100 projects has the error and which reference is missing. This is probably the same message to search for in msbuild output if you aren't able to trigger a build from the IDE.
    – JDiMatteo
    Commented Feb 17, 2016 at 19:24
9

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>
1
  • 1
    This. +1. Same for me. Messed up GUID.
    – Martin Ba
    Commented Oct 30, 2014 at 19:38
2

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

1
  • I ended up resolving this issue by 1) renaming the VS10 project.*proj files to be project_2010.*proj then 2) copying the files and renaming them as project_2012.*proj then 3) manually editing the VS10 ans VS12 solution files and pointing then to the appropriate version of the project files THEN 4) allowing it to upgrade the files as it saw fit. Commented Sep 21, 2014 at 17:01
2

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

0
2

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

1

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!

1
  • FYI, Stackoverflow understand English only! Commented Jun 19, 2014 at 6:09
0

I had the same symptoms, but a very different cause, and therefore, resolution.

In migrating from VS 2003 => 2005> => 2008 => 2010 => 2012 somehow in that last step a Resources.resx file disappeared. Thus the message

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

For me, it wasn't a "Project file", but a" Project's File". (and some people say grammar isn't important.)

I tracked down the missing Resources.resx file and all is well for me.

0

I meet the issue when copy a project to another folder and reopen it Finally I solved the problem by the below ways: 1. right-click on the project 2. open the reference option 3. delete the reference project in the pages

0

Make sure all project files (*.vcxproj) in the solution have the matching GUID in defined in them, something like that:

<PropertyGroup Label="Globals">
    <ProjectGuid>{B4D8DE30-8DCC-85FC-ABFE-3ED6S9F873C0}</ProjectGuid>
</PropertyGroup>

For some weird reason projects converted from VS2008 didn't have that, and VS2010 insisted to replace all projects' GUID in the solution file every time it loaded the solution, but never actually added them the the project files.

Not the answer you're looking for? Browse other questions tagged or ask your own question.