Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto resolve... Visual Studio Source Control notification "Projects have recently been added to this solution"

After some use Visual Studio 2008 when opening a solution that is checked into Visual Studio Team Foundation will pop up a dialog saying:

Projects have recently been added to this solution. Do you want to get them from source control?

This happens every time the solution is loaded (even if no projects have been added). The only way I have found to remove this minor annoyance is to completely rebuild the SLN file.

Has anyone found a better/simpler way?

like image 703
Eric Schoonover Avatar asked Aug 09 '09 14:08

Eric Schoonover


People also ask

How do I remove a Source Control solution?

To remove files from source control: If you select a folder, project, or solution, any eligible child items will also be removed. choose Source Control > Remove or press Ctrl+R, R. The dialog will list the files that can be removed. In that dialog, you can deselect any files you don't want to remove.

How do I add a solution to Source Control in Visual Studio?

To add projects to source control Open the solution in Visual Studio 2010. In the Solution Explorer window, right-click the solution, and then click Add Solution to Source Control.

How can I see the Unload Project in Visual Studio 2019?

NET Framework and other projects of that style, first unload the project (right-click on the project node in Solution Explorer and select Unload Project). Then, right-click on the project and choose Edit <projectname>. You don't have to use solutions or projects in Visual Studio to edit, build, and debug code.


1 Answers

I had this recently after we moved a number of projects in the solution. I worked out eventually, that each project actual appears in solution file multiple times each with path information! So even though the path in the main reference of the project was correct it was wrong further down the file.

So go through the .sln file and make sure the paths in all the references of each project is correct.

For instance, the first reference for one of my projects is:

Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ObexPushVB", "Samples\ObjectPush\ObexPushVB\ObexPushVB.vbproj", "{E3692A59-D636-48E8-9B57-7DA80A88E517}" EndProject 

In my case the path there was correctly updated. But then we have also for that project:

SccProjectUniqueName8 = Samples\\ObjectPush\\ObexPushVB\\ObexPushVB.vbproj SccProjectTopLevelParentUniqueName8 = InTheHand.Net.Personal.sln SccProjectName8 = Samples/ObjectPush/ObexPushVB SccLocalPath8 = Samples\\ObjectPush\\ObexPushVB 

So all of those paths needed to be updated too! After I fixed that manually all was well. (The sample there is after the fix BTW).

like image 82
alanjmcf Avatar answered Sep 24 '22 13:09

alanjmcf