Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Project not showing as checked-in to TFS in Visual Studio 2013

Tags:

I added a new project to a Solution Folder in VS2013. I added the project to TFS via Source Control Explorer but in VS Solution Explorer the little lock icon next to the project is not displayed. I just downloaded the solution to a new computer, and that project did not get downloaded. I had to go into Source Control Explorer and explicitly get it. The solution just does not recognize it as under source control...

How do I correct this?

Any help is appreciated

like image 298
Elgreengoloco Avatar asked Oct 03 '14 20:10

Elgreengoloco


People also ask

How do I add a project to TFS Visual Studio 2013?

In the Connect to Team Project dialog box, select the TFS instance you want to connect to, select the team project collection you want to add to, and then click Connect. In the Team Explorer window, right-click the team project collection, and then click New Team Project.

How do I add Csproj to Source Control?

To do this, I had to go into the Source Control Explorer and open the project directory. From within the directory, right click and select Add Items to Folder. Then you can select the csproj files and you're good to go.

How to add projects to source control in TFS?

Open TFS -> Source Control Explorer -> Right click on Solution folder and click 'Add Items to Folder...'. Now in 'Add to source Control' prompt select the folder of desired project that needs to be added to source control.

Why can Visual Studio see changes in TFS?

Strange that they could see Changes, Branches, Sync and Settings. Probably because the project uses git and that is information Visual Studio could get from the Git folder, it didn't need to get it from the TFS server.

Why doesn't Visual Studio Show projects in Team Explorer?

Probably because the project uses git and that is information Visual Studio could get from the Git folder, it didn't need to get it from the TFS server. The second user who didn't see the other options DID have the project checked in Team Explorer.

How do I unbind a Visual Studio project from another project?

In Visual Studio, open Solution Explorer and select a solution or project to unbind. On the File menu, click Source Control, then Change Source Control. In the Change Source Control dialog box, click Unbind. In Visual Studio, open Solution Explorer and select a solution or project to bind.


2 Answers

You probably need to bind the project to source control.

  • Open the project in Visual Studio.
  • File > Source Control > Advanced > Change Source Control (or you might find there is only an option like File > Source Control > Add to Source Control - I can't remember exactly what this looks like)
  • If you get to the Change Source Control dialog, then select all the projects in the list and click Bind. If this works you should have a tick in the "Connected" column and "Valid" status, and you can OK the dialog and your project should be good to go. If binding fails, then Unbind everything and try binding again.
like image 136
Jason Williams Avatar answered Oct 03 '22 23:10

Jason Williams


Looking back to basics, I discovered some of the files (such as the project file itself) had never been added to source control. I discovered this by going to Source Control Explorer, selecting one of the projects unmarked in Solution Explorer, right-clicking to get the context menu, then selecting Add Files To Source Control, then selecting the whole list presented, then clicking OK/NEXT/FINISH. That marked the unmarked project in Solution Explorer with a plus sign (+) to be added. Then again from Source Control Explorer I selected the solution and clicked Check In Pending Changes. Then I got the lock icon in Solution Explorer.

like image 39
Sspoonless Avatar answered Oct 03 '22 21:10

Sspoonless