Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS source control - new files not automatically detected as pending changes

As per the tags, I'm using VS2013 and TFS2013.

There are multiple projects in the solution: Model, Presenter, View, etc. All other projects are working as expected in terms of source control operations.

Problems with the Model project:

  • Adding a new file via Solution Explorer isn't automatically detected as a pending change
  • Deleting a file isn't detected either

Other source control operations work fine for the Model project, such as:

  • Get latest version
  • Edit detection for existing files (including changes to the csproj file when a new file is added)
  • Checking in pending changes

The csproj file would show up in pending changes with the newly added file listed in it, but the new file itself isn't showing up, therefore causing build errors on other developers' machines if only the csproj changes are checked in.

The workaround is to find the added file in solution explorer and Add via context menu, this will make it appear as a pending change. But this process should be automatic as per the other projects.

Noticed that there is no .vspscc file for the Model project while other projects have one each.

Any help appreciated. Thanks.

like image 549
Steven Manuel Avatar asked Mar 31 '16 00:03

Steven Manuel


People also ask

How do I see pending changes in TFS?

Select that folder in TFS explorer and right click. you will see the option "Checkin Pending changes.." Show activity on this post. In the team explorer open up the source control tab, then right click on the route folder and select Check in Pending Changes.

How do I get rid of pending changes in TFS?

Right-click on the file in the Pending Changes List, choose Undo. believe it or not I actually had this same exact problem. I also didn't have the files. I right-clicked "view pending changes" on the solution and it pulled up all of the pending changes to my deleted files.

How do I fix a pending add in Visual Studio?

In Solution Explorer, the Pending Changes Window, or Source Control Explorer, select one or more items, open their context menu and choose Undo or Undo Pending Changes. To undo all changes you have made in your solution or a code project, open the context menu, and then choose Undo Pending Change.


2 Answers

I would unbind and rebind the problem project and try again:

To unbind a solution or project from source control

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

To bind a solution or project to source control

  • In Visual Studio, open Solution Explorer and select a solution or project to bind.

  • On the File menu, click Source Control, then Change Source Control.

  • In the Change Source Control dialog box, click Bind.

  • Select the database and location to which to bind, and click OK.

  • Click OK.

You might need to go to Advanced to find the Change Source Control option

https://msdn.microsoft.com/en-us/library/0eh3790h%28v=vs.90%29.aspx

like image 85
Cole W Avatar answered Sep 22 '22 01:09

Cole W


Before unbinding and binding your solution try his:

  1. Go to Source Control Explorer
  2. Click the "Add Items to Folder" (the one on the left of the red cross)
  3. Select the items you want to Add and follow the instructions on screen

That's all

enter image description here

like image 35
Mauricio Gracia Gutierrez Avatar answered Sep 26 '22 01:09

Mauricio Gracia Gutierrez