none
The project file * has been moved, renamed or is not on your computer

    Question

  • Hi, somehow my VS2005 Team Suite is still looking in the old/wrong path for my project file and I can't figure out why it's looking there. So here's the deal:

    A while ago I created a solution with 3 projects in it; two C# class projects and one Website project. Life was good and everything worked fine, wonderful. Since then, I have acquired a new development workstation and have been developing happily ever after... until today, when I had to revisit my old Solution.

    Upon opening the old solution file I was prompted with a dialog indicating that it could not load one of my C# class projects because it has been moved or renamed. I OK'd the dialog and attempted to re-Add the project. To try and add my project back into the solution I right-clicked the solution in Solution Explorer and chose Add | Existing Project. I then manually browsed to "C:\dev\utilities\utilities.csproj" and hit Open. In doing this, an error dialog appeared saying:
    The project file 'c:\code\utilities\utilities.csproj' has been moved, renamed or is not on your computer. Even though I specifically browsed to a project in "c:\dev", it was trying to open a project in "c:\code"!? Well, originally when I created the solution it WAS in "c:\code", but today all my local code is in "c:\dev" and my TFS Workspace reflects that.  I checked all of the *.csproj and *.sln files but can't find ANY references to the path "c:\code". I even tried deleting the *.vspscc file but that didn't help either.

    So I guess my question boils down to: Where is VS getting that old path from and how can I get it to look in the right location?

    Monday, December 12, 2005 11:11 PM

Answers

  • I was able to solve this problem by closing VS2005 and then deleting the solution's .suo file. I then restarted VS2005 by double-clicking the .sln file and was able to add the other project to the solution.

    Gary Davis

    Monday, July 17, 2006 9:23 PM
  • There have been a number of bugs fixed in this area...it's not clear whether you've hit one of them or if VS is confused for a "legitimate" reason :) 

    Here's something to try: load the solution, go to File -> Source Control -> Change Source Control, click Unbind on each row.  Save the solution.  Open Source Control Explorer, delete the solution & related files from the repository.  Now re-run the Add Solution To SCC wizard.  That should clear up just about any sln-binding issues.
    Tuesday, December 13, 2005 1:16 AM

All replies

  • There have been a number of bugs fixed in this area...it's not clear whether you've hit one of them or if VS is confused for a "legitimate" reason :) 

    Here's something to try: load the solution, go to File -> Source Control -> Change Source Control, click Unbind on each row.  Save the solution.  Open Source Control Explorer, delete the solution & related files from the repository.  Now re-run the Add Solution To SCC wizard.  That should clear up just about any sln-binding issues.
    Tuesday, December 13, 2005 1:16 AM
  • I was able to solve this problem by closing VS2005 and then deleting the solution's .suo file. I then restarted VS2005 by double-clicking the .sln file and was able to add the other project to the solution.

    Gary Davis

    Monday, July 17, 2006 9:23 PM
  • Hi,

      The first solution has a flaw as when I bind the problematic project back Visual Studio states the binding is incorrect. I found no workaround for this.

      I solved my problem with the second solution, removing the .suo file. This may point to a bug in the suo file metadata management.

      Regards.
      Tiago Dias

    Tuesday, August 22, 2006 2:25 PM
  • I was able too.

    Did somebody investigate why this happens? Is it related to source control or does it happen even without any bound projects? Is here a know issue regarding this behaviour?

    We're loosing a lot of time "playing" around with those unexpected and never wished features of vs (every version). Are there any plans to release a service pack soon or does it take ages again like for vs 2003?

    Thanks

    Monday, September 11, 2006 4:53 PM
  • We too are having this problem. We delete our system folders, clear our workspaces from the client and tf server, and still when we try to load the solution (after closing and reopening VS), we are experiencing problems. We have already consumed 3 man days and still do not have it fixed. BTW~ Everyone else is down waiting for this fix.
    Wednesday, October 11, 2006 9:03 PM
  • I do not know for sure, but I think the directory setup can also be a problem. Make sure all websites in the solution are in a directory located under the solution. Best is to have all projects in a directory under the solution.
    Wednesday, November 15, 2006 10:58 AM
  • I just hit the same issue as well and had to delete the .suo file that solved it.  Need to find out if there is a patch for this one.
    • Proposed as answer by carlosqsar Tuesday, August 23, 2011 2:57 PM
    Monday, November 20, 2006 9:29 PM
  • Ran into the same issue and your solution worked for me. Thank you.
    Tuesday, December 12, 2006 6:08 PM
  • Found out that removing the reference in the solution's .sln file ProjectSection fixed it for me, seems to be an incorrect reference or a reference put in the wrong section....

    Monday, December 18, 2006 8:00 PM
  • In VS08 I had the same problem, just removed the sln cache file restared VS, added the existing project and bang!!! Smile

     

    Miguel Madero

    Thursday, January 31, 2008 6:40 AM
  • I faced the same problem in VS2008. Removed .suo file and then opened solution by clicking on .sln file. It worked !!!!

    Sunday, July 06, 2008 10:36 PM
  • I had somewhat similar issue with my asp.net web-site solution.
    After struggling for few minutes, i removed the references and added them again

    and Yes, it solved my problem :-)

    Cheers!!!

    Friday, October 03, 2008 5:40 PM
  • Thank You !!!!   That fixed it for me.
    Thursday, January 07, 2010 9:15 PM
  • I just had this issue with Visual Studio 2010 after converting to Team Foundation Server 2010 from VSS. All I did was delete the .suo file for the solution I was trying to add the other project to, and it fixed the issue. Crazy that 4 years later, this issue still exists.
    Tuesday, April 13, 2010 11:33 PM
  • If none of the solutions works... then

    >>Open the solution file in edit mode

    >>Modify the solution path to match the physical path by opening solution file ..

    SccProjectUniqueName1 = Source\\Order\\Order.csproj
      SccProjectName1 = Order.ApplicationService
      SccLocalPath1 = Order.ApplicationService

    >> Also makesure of correct path for the project

    Project("{asdasd-301F-11D3-BF4B-asdasd}") = "Order", "Source\Order\Order.csproj", "{E25641BC-C990-40E2-8876-08AE8728F763}"
    EndProject

    Tuesday, April 20, 2010 2:06 PM
  • I was running into this as well, but none of the solutions in this thread worked (I don't even have an SUO file to delete!).  The one thing that was odd about my solution was that I have a C# library project and an ASP.NET web site project with the same name, in different folders on the file system, but both in the same solution.  This "worked fine" when I originally developed this solution 5 years ago, but now, after moving to a new computer and to VS2008, all I could get out of VS was this most unhelpful error message. 

    The thing that appears to have solved it?  I renamed the website project.  I can only assume that something in VS is being careless about handling project names and somehow confused the two.

    Another thing that appears related is the use of solution folders - even if the solution folder actually mirrors a filesystem folder in the same solution-relative location.  I had a couple of websites that were in {sln-dir}/Websites/{site-name} that were added to the solution in a Websites solution folder, but the project was recorded in the .SLN file has having a Physical Path of {site-name}\ when it should have been Websites\{site-name}\.  Hand-editing the .SLN files to correct the PhysicalPath properties of the websites corrected the problem.

    VS2008 SP1. 


    -cd [VC++ MVP] Mark the best replies as answers!

    Tuesday, September 07, 2010 6:22 PM
  • I was able to solve this problem by closing VS2005 and then deleting the solution's .suo file. I then restarted VS2005 by double-clicking the .sln file and was able to add the other project to the solution.

    Gary Davis


    This solution worked for me in VS 2010 aswell.
    David Dikman, http://www.greycastle.se, Örebro, Sweden
    Wednesday, January 26, 2011 11:49 AM
  • This solution worked for me as well in VS 2010.  Many headaches and lost hours dealing with this issue.  Thanks for the help all!
    Monday, February 14, 2011 7:58 PM
  • If none of the solutions works... then

    >>Open the solution file in edit mode

    >>Modify the solution path to match the physical path by opening solution file ..

    SccProjectUniqueName1 = Source\\Order\\Order.csproj
      SccProjectName1 = Order.ApplicationService
      SccLocalPath1 = Order.ApplicationService

    >> Also makesure of correct path for the project

    Project("{asdasd-301F-11D3-BF4B-asdasd}") = "Order", "Source\Order\Order.csproj", "{E25641BC-C990-40E2-8876-08AE8728F763}"
    EndProject


    Best solution. I really appreciate
    Thursday, April 21, 2011 6:47 AM
  • Seems like some have had success with deleting .suo file, and some have not.  It didn't work for me... so here's what I did (which DID work... you can try it).  Note I am using TFS 2008 and VS 2008, and the problem project was a web project.

    1. In your TFS Workspace for the failing solution, copy <SolutionName>.sln to <SolutionName>.xxxsln as a backup, just in case.
    2. Edit your <SolutionName>.sln in Notepad.
    3. Remove all lines from Project("{some GUID here}") = ... down to EndProject, and save.
    4. If your solution was closed, open it.
    5. If your solution was already open, go back to VS, it will indicate "Your file was edited outside VS"; tell it to reload from disk.
    6. Magically you will have a solution but the project will not be there.  Have no fear... continue:
    7. Right-click the solution, select Add existing web project.  Navigate to the folder containing the web project (just above the app_code and bin folders and web-config file).  Click OK.
    8. Because I had references to other projects/DLLs, I had to add the references to those projects/DLLs.  I suggest right-clicking the PROJECT, selecting Start Options, click References in the option tree at left, then click Add as needed on the right panel.
    9. Everything should now be fine.  Test by right-clicking the solution in Solution Explorer and selecting Build All.  Instead of receiving error message, it should build just fine.

    Best of luck with this alternative approach.

    Ray

    Monday, July 11, 2011 6:42 AM
  • Confirmed that this bug is still in Visual Studio 2010.

    I deleted the .suo file and it resolved the issue.

    Friday, August 05, 2011 8:33 PM
  •  

    I had this issue when I moved my entire project and renamed the parent folder.  You may run into this issue if you move your solution and/or rename it.  If you haven't moved or renamed your solution area then deleting the .suo file is the way to go.

    Solution:

    - All you have to do is open the .sln file in notepad and fix all your "PhysicalPath" and "Project" Path.  

    Example:  PhysicalPath = "\..\..\..\..\My_Project\MySite\"  (OLD Path)

                     PhysicalPath = "\..\..\..\My_Project\ParentFolder\MySite\"  (NEW Path)

    Reopen your solution and now VS will know about all your solution files.  Apparently, even VS 2010 is not smart enough to automatically recognize the location you are opening from and automatically fix all paths.

    Cheers!

    Padam


    • Edited by Padam Tuesday, September 13, 2011 3:05 AM
    • Proposed as answer by Padam Tuesday, September 13, 2011 3:06 AM
    Tuesday, September 13, 2011 3:02 AM
  • If none of the solutions works... then

    >>Open the solution file in edit mode

    >>Modify the solution path to match the physical path by opening solution file ..

    SccProjectUniqueName1 = Source\\Order\\Order.csproj
      SccProjectName1 = Order.ApplicationService
      SccLocalPath1 = Order.ApplicationService

    >> Also makesure of correct path for the project

    Project("{asdasd-301F-11D3-BF4B-asdasd}") = "Order", "Source\Order\Order.csproj", "{E25641BC-C990-40E2-8876-08AE8728F763}"
    EndProject

    Tryed all of the proposed solutions, but the won't work. But this solution had a good hint for me. Instead of changing the path I deleted the whole project within the .sln file (also all references of it's GUID). Then I opend the .sln in VS (2010) and added the project again.
    Friday, February 03, 2012 9:56 AM
  • Added: you should remove solution .suo file, not project suo. This is binary file and it's hidden, so you should turn on option "Show hidden files"
    • Proposed as answer by MSellers Friday, September 06, 2013 4:10 PM
    • Unproposed as answer by MSellers Friday, September 06, 2013 4:10 PM
    Thursday, September 05, 2013 2:20 PM
  • Just confirmed this is still a problem in VS 2012.

    Deleting the suo file fixed the problem.  The suo file is now name xxx.v11.suo and is a hidden file.  So to find it you will have to use the dir /A:H command.  And delete it with del /A:H xxx.v11.suo command.

    • Edited by MSellers Friday, September 06, 2013 4:12 PM
    Friday, September 06, 2013 4:10 PM
  • I had this problem in VS 2010. Deleting the suo file actually did not work for me. Deleting both the suo and sdf files did fix the issue.
    Thursday, October 24, 2013 5:02 PM