Visual Studio retrieves the wrong project path from somewhere

Visual Studio (and maybe TFS) somehow (I think maybe during the source merge) got confused in the project path in my solution.

He thinks this is here (examples of paths for simplicity):

C:\My Projects\ExampleSolution\ExampleProjectWrong\ExampleProjectCorrect.csproj 

whereas actually the project file is here:

 C:\My Projects\ExampleSolution\ExampleProjectCorrect\ExampleProjectCorrect.csproj 

I can’t understand in my whole life that this place. I tried:

  • Removing and re-adding a project from the correct location. An error message appears The project file at C:\My Projects\ExampleSolution\ExampleProjectWrong\ExampleProjectCorrect.csproj could not be found .

  • Manually edit the .sln file to make sure all references to ExampleProjectCorrect.csproj have the correct paths.

  • Performing a search in the files in the solution directory for both correct and incorrect paths to try to track where the studio is hiding the wrong path.

  • Removing cache directories for VS and TFS

I tear out my hair because I can’t recreate the solution, because it is close, since it does not matter 100 projects and is tied to the initial control with several other developers working on it.

Can someone point me in the right direction regarding where it stores this wrong path and / or how to reset so that damn thing loads correctly?

+95
caching tfs visual-studio
Oct 06 2018-11-11T00:
source share
14 answers
  • Go to "Manage workspaces" (either in the "Manage files / sources" menu or in the workspace in the source code explorer).
  • select edit for your workspace.
  • In the working folders you should see a mapping for the source. Manage the directory in the old / wrong project directory.
  • Select it and click "Delete."
  • Close VS and delete the suo file.

It still refers to the wrong directory. Perhaps alteration may work at this moment, but I did not. Restart your project and you should be fine.

+92
Nov 11 '11 at 20:48
source share

Simple deletion of .suo files for me.

+31
May 08 '14 at 9:30
source share

I ran into this problem after completing the transition from Visual Source Safe 2005 to TFS 2012. I could not wait for the Conversion Wizard to appear in the next couple of weeks, so I just ran VSSConvert.exe. It took about 6 years of history and moved it to TFS ... while I didn’t have a real history of chronology ... On the same day I received a bunch of notes with comments indicating the actual registration of the history .. not bad.

Therefore, after it worked all night (successfully, cheers!), I had problems loading my projects, as this question was asked. For some reason, several projects referenced the wrong directory. I checked the .sln, .vsproj files and got the latest version by deleting the retry, adding the delete, etc. I tried everything that was noted here ... even updating my workspace, which I'm not sure it even did.

FINALLY ... I deleted the * .suo and alt files. It worked.

I spent a couple of hours on this.

+12
09 Oct
source share

A slightly different solution.

TFS showed a nonexistent path for a particular solution. I used to have a laptop with a separate D: drive, but now I just have a C: drive. TFS still believed that my project was stored in D: \ Project \ MikesProject

I didn’t have a .suo file to delete, path D: was not mentioned anywhere in my workspaces (hidden in the File\Source Control\Advanced\Workspaces ), TFS showed that I had the latest files in my (no-longer- existant) D: the directory, and TFS in VS2013 does not have the option "Delete mappings" for this project.

But what work was just to get the latest version in the project.

After that, a new copy of the code was written to my C: drive and (interestingly), now the local path was shown underlined .

Previously, path D: was not displayed like that.

Odd. Very strange.

+5
May 14 '14 at 9:40
source share

We had similar problems with moves and renaming. Delete local directories, and then re-solve.

+2
Nov 11 '11 at 20:56
source share

Even after deleting the .suo and .vs I had to edit the .sln file and remove the old relative URL from SccProjectName# , despite the correctness of SccLocalPath# . Apparently, VS also uses this name as a hint path.

+2
Jul 29 '16 at 15:23
source share

Try deleting or renaming the .suo file (including the extension). This file is in the same place as the solution file. It worked for me.

+1
Aug 26 '16 at 17:44
source share

Just guessing, but maybe some of your other projects are linking to your project from the wrong location? In this case, you don’t just need to delete and re-insert the project into your solution, you also have to delete and recreate links from link projects (stored in their .csproj files).

0
06 Oct '11 at 11:19
source share

After following many recommendations, I deleted the suo file (again). Last time worked. Why this did not work before, I do not know. In general, I consider deleting the suo file as one of the first steps that I take.

0
Jun 07 '14 at 2:59
source share

I got my asp.net website solution open from my Dev branch. Then, for some other purpose, I opened the same solution from the main branch.

I made changes to one of my .ascx.cs files in dev branches and set a breakpoint. When I started the debugger, all my breakpoints ended up in the Dev branch, with the exception of .ascx.cs, which ended up in the main branch. I do not know.

I tried to clear the temporary folder, but did not work.

What worked:

Closed all instances of Visual Studio

reopened the solution from the Dev branch.

Run again, and breakpoints started to hit.

0
03 Mar. '15 at 18:31
source share

In my case, I copied the * .sln file to the project folder and changed the project path to the * .sln file. Only this resolved the issue (vs 2015 sp1, winservise project).

Delete * .suo does not help me.

0
Sep 11 '17 at 2:48 on
source share

If you run your web application under local IIS instead of IISExpress, make sure that you click the "Create a virtual directory" button by going to the project properties. After that, perform a Clean Solution and Restore Solution.

0
Apr 12 '18 at 2:23
source share

Another solution worked for us - after trying to remove suo and almost everything that is mentioned in this thread. We had a project in a solution that showed a ghostly version of the csproj file. We deleted this file and our paths were fixed in another project that we were trying to add.

0
Jun 12 '19 at 14:39
source share

I know this is an old line. I just experienced the same problem. We recently migrated TFS, so I created a new workspace to map to the new server and saved the old one. Each time I open a solution that should target my new workspace, VS always tried to load projects from my old mapping directory until I deleted the old workspace.

-2
Apr 07 '14 at 14:27
source share



All Articles