If I open VS without opening a project/solution, I get a list of files in Pending Changes. The folders marked in red are solutions in my workspace, and those marked in green are branches of the solution.
However, when I open the respective solutions directly, none of those files are there. Somehow there is some overlap of what VS/TFS thinks needs to be checked in, even though in this case it is wrong.
I opened each solution from Pending Changes in turn, and there are no files to be checked in. I don't understand what (or why) it's showing me this list, and am concerned that if I accidentally check-in while showing "All" pending changes instead of solution-specific ones, that I will lose work.
Can anyone please explain why its showing these "phantom" pending check-ins? Even more bizarelly, the same of the solution in the title bar of pending changes is not even remotely related to some of the files shown.
If I delete my workspace, then create a fresh one, and then get recent, the problem goes away for a few weeks, but then randomly files start to appear back here.
This could be a source control binding error or some TFS cache issue.
Try to unbind/ bind this files in source control. File > Source Control > Advanced > Change Source Control
File > Source Control > Add to Source Control
Detail ways please refer: Project not showing as checked-in to TFS in Visual Studio 2013
Also give a try with clear VS and TFS cache
Related
I am new to using TFS source control.
I have a large project which I have been porting from SVN. I am checked in and up to date with all projects. However, I opened up Visual Studio today and all project items are in the pending changes included window even though there are no changes.
I haven't touched or edited any of the files for my TFS files since last time.
To verify, I used Araxis Merge to do a folder comparison and can see that no actual changes have taken place.
Why are these unchanged files appearing in my check-in window?
Here is an example of a diff in visual studio from the previous version:
I can't see anything!
Hopefully this shows my local workspace
When you create or edit a workspace, you can specify whether its location is Local or Server. Local Workspaces are TFS's attempt at DVCS and actually gives you a much more SVN-Like experience.
Edit the workspace and choose advanced, you could see the Location of workspace type.
Maybe formatting, line endings, encoding. Do a diff using Beyond Compare or something to see what changed.
If nothing changed, check if you are using the same workspace. You may select another workspace than you used.
In Source Control Explorer, check if you choosed the workspace the workspace you were work in.
If all above not work, you could also try this workaround, select all the files in "Pending changes" window and activate the context menu. Then click "Undo..." > "Undo Changes" > "No to All".
The files without changes will be rolled back. More details please take a look at this question: how to undo pending changes of files that are unchanged?
I am using VS2015 and I work with 4 different projects and sometimes 2 different branches for a project. In VS a Team Explorer, under Pending Changes I see all the files checked out, from all the projects ( they are all host on the same tfs server). Each time when I want the make a commit I need to check to have only the files from the current opened solution and not check in anything else.
I was wondering is there is a tool/extension/option to only view as pending changes the files that are included in the current solution (the one that is opened in VS). This way I do not have to worry that I when I do a commit I include files from a different project.
Map different workspaces and switch between them as appropriate.
Just right click the solution/project/file in the VS solution explorer > Check In> then Just the files included in this solution/project/selected file in the Included Changes section, other files will be listed in Excluded Changes. So you can click Check In button directly.
My team and I started a project at Azure and we have a git as the VCS/SCM.
One of my partners had made a few changes, and he had commited them. When I try to get those changes at my local repository, and I press sync at the Visual Studio, the following message appears
Cannot merge because there are uncommitted changes. Commit or undo
your changes before merging again. See the Output window for details.
The output window shows the message below
Cannot complete the operation because of existing changes to the
following file:Project\Project.csproj
I have searched everywhere at google, but I did not find anything similar.
Can anyone help me with this?
We are stack.
Thanks a lot
It probably means VisualStudio automatically added some references to the file ProjectProject.csproj, where it keeps general project settings. In VisualStudio 2013 you may do:
Go to the TeamExplorer
Select "Changes"
Search through Included and Excluded Changes, .csproj file is probably there
Right click on it and select compare with unchanged to see the differences
Now choose to commit it or undo the changes (if, for example, the changes are not necessary) to be able to sync with the current repository.
I had this same dilemma and it turned out that somehow the file that was preventing me from switching branches and was in my solution, was not being tracked like the other files were. I just added it to source control via the explorer window, committed and pushed it, then I was able to switch branches just fine. Hope this helps.
Somehow, due to folder renamings and various other source code changes, I'm having an irritating problem. I'm showing a pending change for a file that cannot be undone in TFS.
This is a little hard to completely explain. Here is what the directory/file structure looks like in TFS:
RootFolder
Folder
FileA
FileB
OldFolderThatWasRenamedToFolder (shows add icon)
FileA (shows "edit" pending change)
"OldFolderThatWasRenamedToFolder" had been renamed to "Folder" and is committed to TFS like that. The "FileA" under that non-existing folder references the same file as "Folder/FileA" but registers as a different file; for example, if I change "Folder/FileA," pending changes are shown for both "files." Whenever I undo pending changes for the phantom file, TFS reports the error:
No pending changes were found for .../Folder/FileA.
I cannot get rid of this annoying false pending change. I've done an update in the folder forcing an overwrite and even deleted the folder prior to the update. How can I eliminate this phantom pending change?
Update:
I found a potential clue. When I compare the "pending" file with the latest, no changes are detected, but when comparing with the "Workspace version," the file is compared with an older version of the file. I've recently tried deleting my workspace and creating a new one, but the same problem persists. What exactly is going on? Where are these pending changes even stored? Is there some file I can manually edit?
In visual studio 2010, you can right-click on the phantom pending check-in on the "Pending Changes" panel and click "Undo..." on the popup menu, then click button "Undo Changes" on the dialog box "Undo Pending Changes", the phantom pending check-in will be removed from the list.
You should be able to undo the pending change with a 3rd party tool called TFS Sidekicks.
It is a free set of utilities by Attrice. I use it especially when I (or a client) come across such problems, as well as permissions issues, and the like.
Moreover, the tool will allow an administrator to do the same for other users. That means that it will solve situations where code is marked as checked out by a user that may no longer exist in the system.
Download it at http://www.attrice.info/cm/tfs/index.htm
Hope this helps.
I figured out a way to fix this using the tf.exe command line. By entering this:
tf undo /workspace:MyWorkspace $/.../RootFolder/OldFolderThatWasRenamedToFolder/FileA
...I was able to undo the pending change. If anyone knows how to do this same thing without resorting to the command line, I'll accept their answer instead.
I know this is an old post, but I expierenced the same thing.
What I found: John Kurlak's command line worked for me. I wanted to try something so I ran the TF MERGE again. This time I closed all Visual Studios open and then reopened it. The files showed up in Pending Changes and was able to Undo from there.
I know this is an old question, but I just faced that issue and I was not able to figure this out with sidekicks or tf command line tool. In my case the solution was close the solution and delete the .suo file.
John Kurlak's comment helped me a lot, but let me describe what issue happened in my case and how I solved it.
I've tried what he has suggested:
I opened the developer console, did a cd to the directory of my branch, and ran:
tf undo * /recursive
Then selected "All" when the tool asked "Undo your changes...? (Yes/No/All)".
In my case that was not enough, because NUGET left some files which were not added to TFS. That caused the tf tool to abort with the error:
TF400024: The change on
C:(SomePath)\themes\base\images\ui-icons_cd0a0a_256x240.png cannot be
undone because a file already exists at
C:(SomePath)\themes\base\images\ui-icons_cd0a0a_256x240.png. The file
must be deleted from disk for the undo to succeed.
In this case, I had to delete those files mentioned manually, and then retry until it succeeded. That had to be done a few times.
Note:
Those files can be found easier in the file explorer if you have the TFS power tools installed, because the files belonging to TFS have a green triangle in their icons, the other filies (the ones you need to delete) not.
I had a similar issue with a project that is stuck in AX version control/pending objects with “Add” action. I could not get rid of it by clicking on “Undo checkout” because it no longer exists in AX projects, local repository, nor in VSTS. To get rid of it, I created the project in AX/projects/shared then was able to get rid of it by going to AX version control/pending objects and clicked on “Undo checkout”. I believe this occurs when you create an object in AX, add it to version control, then rename the object afterwards. Hope this helps.
I am still new to VS2010, but this is how I fixed this issue for me:
Go to Source Control in the Team Explorer panel. In the Source Control Explorer, right-click the directory, project, or source code file for which there are pending changes to be ignored. Select Undo Pending Changes. A modal dialog appears confirming the Pending Changes that will be undone. Select Undo Changes, and voila! No more phantom pending changes.
Why would my VS solution lose its TFS bindings suddenly? I have been working on a project for six months and this never happened. As soon as I opened a VS project/solution, I could check in/out, view history by right clicking on any given file. But suddenly, I dont see those options to checkin checkout etc any more when I right click on a file in VS studio solution explorer.
The team explorer window still brings up the source folder structure and I can get latest or get specific from there but did any one see this kind of behavior? Please let me know what I can do to avoid these situations in future.
Did you lose connection to the TFS server any time recently? I've had this happen in the past on unreliable network connections when working via TFS remotely. The solution and all projects therein would "go offline" and would appear to lose their bindings. This made it particularly unintuitive when the connection was re-established because changes made while "offline" weren't always found.
If you right-click on the solution or the projects, is there an option to "go online"? You might check the various menus for such an option as well.
Did you move the source files to a different location on your harddrive, or change your workspace mappings?
Try opening the solution/project by double-clicking the .sln file in Source Control Explorer instead of opening it from windows explorer.
You can also try bringing up the Bindings dialog by going File -> Source Control -> Change Source Control
I recently had a very similar experience. I had made several changes which I thought may have influenced my connection resilience. After reversing out of 2 of them and the problem persisted, I finally clocked what it was.
One of the new extensions I am using is NuGet (http://nuget.codeplex.com/). Every time I attempt to add a library my TFS connection fails and is unrecoverable till a restart of VS 2010.
See: http://nuget.codeplex.com/workitem/725
There is a work around that has been reported and working which may help you even if this is not your problem.
see http://blog.rthand.com/post/2011/08/26/Fixing-combination-of-NuGet-and-Team-Foundation-in-workgroup-configuration-401-Unauthorized.aspx
Happened to me also. I was removing a whole bunch of mappings for old releases under the local workspace. It was taking over 40 minutes so I killed it. The mapping has been removed to the older branches but the branch left behind had been disconnected from TFS.