Unable to get latest from TFS - visual-studio-2012

I have my source code in TFS.
The issue is that when i try to get the latest files from the TFS, I am made to wait for 5 minutes for connecting to server to get. and then it says timed out! Then i will have to connect to the TFS again.
Still not able to get the code!
I had tried mapping it to a different folder but even that failed.
I am using Visual Studio 2012 Express for web.
I have already tried clearing all the local data, cache and all that kind o stuff. I even tried resetting the user data.
Also tried logging in with another account to check weather if it was an issue with my Hotmail account(it's not. because i am not able to get it even with another Id).
Nothing helped!
Issue Fixed!
Here are the steps i did to fix it.
Since clearing all files may reset all your settings on visual studio, this should be the last possible option to do.
Just did a repair on the VS 2012,
cleared everything from
C:\Users\(Username)\AppData\Local\Microsoft\Team Foundation\4.0\Cache
Clear everything from
C:\Users\(Username)\AppData\Local\Microsoft\VisualStudio
Clear everything from
C:\Users\(Username)\AppData\Local\Microsoft\VSCommon
But here is another issue.
I had added a file by mistake to a different repo. I have deleted that from the server(Online). but the deleted project file is still shown in my source explorer in VS with a plus sign! How do i remove those?
if anyone have any idea, please help! Thanks a lot..!

Seems your project file still have some source control bindings. So that file can be detect as new add file in source control explorer. You need to remove source control bindings.
There is a tool to remove Source Control Bindings from Visual Studio Solutions and Projects from msdn: Remove Source Control Bindings from Visual Studio Solutions and Projects Detail steps as below:
Delete the .suo next to the .sln file, and then opened the .sln file in Notepad and deleted this entire section:
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 2
SccEnterpriseProvider = {xxxxx}
SccTeamFoundationServer = http://some-other-guys-tfs-server/
SccLocalPath0 = .
SccProjectUniqueName1 = xxDemo\\xxDemo.csproj
SccProjectName1 = xxDemo
SccLocalPath1 = xxDemo
EndGlobalSection
Save the .sln in Notepad and then open in Visual Studio.
More ways and more information for you reference: How can I completely remove TFS Bindings

Solution for the second question!
It was a misunderstanding of the pending Change.
I had deleted the folder from the server but the file names still appeared on the TFS source explorer on VS.
It was just because VS did recognize it as a pending change to be checked in even-though it wasn't one!
So just an undo pending changesdid the trick for me!

In TFS server have you set all privileges (access) for your account. If not then add Administrative access for your account on TFS.

Related

Excel TFS Add-In Crashes Connecting to TFS

We frequently use Excel to perform bulk updates of data in TFS. Up until very recently, the Team Foundation Add-In has worked very well. However, it has started failing in several ways:
It will connect to the server, but attempting to connect to any
project causes Excel to crash, producing a Watson report in the
Windows Application Event Log.
If I restart Excel, it reports that it is running into problems with
both the shim and the add-in, and offers to disable it. If I do not
disable it, I still can't connect to a project.
Eventually, the add-in refuses to load at all, until I use the
Options dialog to manually add the COM add-in back into the
application. Doing so produces the same results (Excel crashes when
attempting to load a project).
I have taken the following steps in an attempt to resolve the issue:
Removed and completely reinstalled Office.
Re-registered the add-in component.
Uninstalled and reinstalled Team Foundation Office Integration.
None of these have produced a fix to the issue.
Does anyone know how to resolve this issue?
P.S. If this is not the correct "stack" for this question, kindly point me to the correct one on the exchange. Thank you.
If you are reading the accepted answer and it still isn't working, here's an additional tip. I had the EXACT same problem and saw that same link to clear the cache from numerous sites, bit it didn't work.
Here's the thing. I don't think that article lists ALL of the places that cache can be hiding on your machine. I deleted the cache folder in two different places on my machine and had given up on that as a solution.
Then I searched my entire hard drive for any folder with "Team Foundation" in the name and found a couple more buried in other hierarchies. Deleting these FINALLY solved the problem.
Here are some folders to look for, but like I said, check the entire drive
c:\users\yourlogin\AppData\Local\Microsoft\Team Foundation
c:\Program Files\Common Files\Microsoft shared\Team Foundation Server\
c:\users\yourlogin\AppData\Local\Temp\Microsoft\Team Foundation
The actual cache folder will be nested another level deep under a numbered folder named with something like "7.0" or "8.0" delete the cache folder from every one you find under every number.
In general cleaning the caches on your client machine will resolve such problems, including the TFS and VS caches...
To clean the caches, please see How to clear the TFS cache on client machines

Unable to shelve changes in VS2012 for TFS2010

We are using TFS2010 (for source control only), and until recently everyone was using VS2010. Our developers just installed VS2012.
Pulling down code works fine in Visual Studio. When you go to "Pending Changes" in Team Explorer, we are seeing TF201072: A user or group could not be found. Verify that the users and groups used in your work item type definition have been added to Team Foundation Server., twice, at the top. We can still check-in code from VS - seems this error is ignored.
However, we are unable to shelve changes - when you attempt to shelve, the same error comes up in a popup, and the shelveset is not saved.
We can shelve using the command prompt (tf shelve), and can still shelve using VS2010, so it doesn't seem to be a permission issue. Also, the TFS administrator is not seeing the error message, and can shelve from VS2012 with no error.
Any thoughts as to what could be causing VS to error out here? We've tried clearing out the TFS cache, creating a new workspace, and gone over every option we could find in Visual Studio.
I had the same issue. Tried many different stuff from web sites and non of them helped. Finally find the solution for this. Follow these to make it work:
1) Create temporary AD User
2) You will need to transfer all old user configuration into a new temporary account. If you are OK with using the temporary account you may just keep it and get rid of old account. Go into the machine that TFS is installed and Run this command: TFSConfig identities /change /fromdomain:mydomain /todomain:mydomain /account:oldAccount /toaccount:temporaryAccount
(TFSConfig is in C:\Program Files\Microsoft Team Foundation Server XX.0\Tools\)
3) If you don't want to use temporary account you will need to convert from temp account to your old account. To do that run the same command wit changing the user names:
TFSConfig identities /change /fromdomain:mydomain /todomain:mydomain /account:temporaryAccount /toaccount:oldAccount
That's all you need to do.

Disconnected TFS Server still lives on in VS 2012

When starting VS 2012, I'm getting this error in the Output window:
> TF205020: Could not connect to server ‘https://Xxxxxxxx. This server was used in your last session, but it might be offline or unreachable. Confirm that the server is available on the network. To attempt to connect again, or to a different server, click ‘Connect To Team Foundation Server’ in Team Explorer or the Team menu.
>
> The server returned the following error: TF400324: Team Foundation
> services are not available from server https://Xxxxxxx. Technical
> information (for administrator): The underlying connection was
> closed: Could not establish trust relationship for the SSL/TLS secure
> channel.
(Xxxxx used for server name here).
This is a TFS server I used on a contract project a couple of months ago - I'm no longer working with them so I want it just gone. I removed the server in the Team / Connect to Team Foundation Server... dialog but this seems to live on in VS's memory somewhere.
Anyway to make it be gone/gone?
I (finally) was able to remove all my bindings and references to an old TFS server by doing the following:
Delete the contents of the folder, %LocalAppData%\Microsoft\TeamFoundation\Cache.
As someone else suggested, search for all occurrences of LocalItemExclusions.config within %LocalAppData%\Microsoft\Team Foundation\, and remove any/all "TeamProjectCollection" elements that reference the obsolete server in their uri="..." attribute.
Edit the file, %LocalAppData%\Roaming\Microsoft\VisualStudio\11.0\TeamExplorer\TeamExplorer.Config. Remove all "Server" elements having a url attribute that references the obsolete server.
I did this for both VS 2010 and VS2012. It was not until I completed the third step that the error mentioned by the original poster went away, and Visual Studio started quickly, as it always used to.
I was unwilling to use the nuclear option as described in the first part of superlime's answer to this question--deleting the entire contents of "%LocalAppData%\Microsoft\Team Foundation\".
Instead I followed the second part of his answer--deleting the contents of "%LocalAppData%\Microsoft\Team Foundation\N.N\Cache", which I did for all versions (N.N) found.
That helped, but wasn't quite enough. I also had to do the following:
Search for all occurrences of a file called LocalItemExclusions.config within "%LocalAppData%\Microsoft\Team Foundation\" and its subfolders.
Remove from those files, in their entirety, any <TeamProjectCollection> elements that reference the obsolete server in their uri="..." attribute.
That was enough for me--however, I can imagine other references lurking, if you've been using TFS targeting that server for awhile. If the above steps are insufficient, you might simply try searching for additional references in all files (excluding logs) in that directory hierarchy, and surgically removing them.
I found that I needed to do both steps to remove this from VS 2012 :
Delete the content of the folder %LocalAppData%\Microsoft\TeamFoundation\Cache
Delete the content of the folder %LocalAppData%\Microsoft\Team Foundation\
Much thanks to both contributors for their help. Shame to Microsoft for not insuring that removing Team Foundation occurs cleanly.
Bit of a "nuke from orbit" option, but try deleting the contents of the TFS client cache. Should be located in this location:
%LocalAppData%\Microsoft\Team Foundation\
According to this blog post (which is for 2010, and a little stale on version info), you should just delete the contents of the cache folder, not the cache folder itself (or the parent dir).. So theoretically you'd just want to delete everything inside of:
%LocalAppData%\Microsoft\Team Foundation\4.0\Cache

TFS removing lock of other user

I am hosting a project in visualstudio.com and what I have is only a VS studio 2012 installed. My friend has checked out and locked a file and then re-installed his windows, also creating a different name for his computer and thus he cannot check it in. Is it possible to remove that lock in any way? I am the one who created the project, so I should have all admin rights. It's just I do not know how to do it. I tried using
tf lock /lock:none /workspace:FRIEND-PC;friend#email.com filepath/filename.css /collection:https://***.visualstudio.com
however it seems to be searching in my computer which is not what I want at all. Nothing better I was able to find though :(
I had this trouble too. I couldn't get the commands to work without errors. What did work for me was much simpler.
From within Visual Studio 2012(and 2013):
File -> Source Control -> Advanced -> Workspaces...
In the dialog that came up, I checked "Show remote workspaces" and the locked workspace came up in the window. I then selected it and clicked "Remove".
try
tf workspace /delete FRIEND-PC;friend#email.com
Deleteing the old workspace will remove any pending changes or locks.
Here's what I did to remove the lock
tf undo /workspace:USER;Domain\User xyz.cs
I was able to remove the lock this way:
C:\Users\****\Documents\Visual Studio 2012\Projects>
tf undo /workspace:FRIEND-PC;friend#email.com
/collection:https://xxxx.visualstudio.com/DefaultCollection
$/xxxx/ProjectFolder/ProjectName/filepath/filename.css

Error opening project from Source Control

I had originally bound a website in my IIS to D:\Project\ortund\ but later decided to move it to D:\web\ortund\ for reasons.
I copied the project files to the new location and changed the binding in IIS.
Now whenever I open the solution from my source control (Dynamsoft SourceAnywhere), Visual Studio gives the following error:
It's very generic so I'm not sure what the problem is here.
Has anyone seen this before or got any clue how to fix it? Restarting Visual Studio as is recommended doesn't help.
Try use File->Source Control->Change Source Control to update the source control binding info.
To move your project location on your local disk, it's recommended that you use File->Source Control->Open from Source Control and retrieve your project to the new location. This way, the binding info will be updated automatically.

Resources