Disconnected TFS Server still lives on in VS 2012 - visual-studio-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

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 get latest from TFS

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.

Visual Studio 2012 Build Process Template Dropdown does not populate

My issue is that I cannot select a build process template after migrating to TFS/VS2012.
I managed to google and find one article which suggest the same problem here,
Possible Bug
Any ideas how I can get the dropdown to load the Build Process Templates or why they may not be getting loaded?
Also, I am able to click New->Copy Template, and copy successfully, but it never populates the dropdown list after accepting.
Possibly the same issue
I recently ran into the same problem but not related to upgrading the server. We were not able to see build process templates when trying to add a new build definition. We are in TFS 2012. This team project also appeared not to have any build definitions. That was expected though because we had not yet used the TFS builds on this team project.
The problem was caused by someone with admin rights setting the "View build definition" and the "View Builds" access rights to Deny for everyone.
By just setting that back to allow on the TFS group, we suddenly could see the build definitions and also were able to select build process templates.
It was really strange that it let us add new build process templates, but we couldn't select them.
Sooo...
I was finally able to get the templates loading by doing the following.
Unmapped the entire TFS project which had been mapped in a sub folder and not at the root.
Deleted files from disk completely
Remapped the TFS project, this time from the root TFS project level
Accepted the "get"
After doing this my build definitions loaded and worked. (Seems to be a mapping issue...bug...)
This may be an extream solution and I am still not sure what happened but it now works.

TF400324 - "Page not found" in source control explorer

We use TFS2012 and VS2012 (some people use Update1 and some Update2). ). In some people's machines, we get:
TF400324: Team Foundation services are not available from server vstfps\Protection.
Technical information (for administrator):
Page not found.
This happens on any source control access, both in VS2012 and when running "tf.exe get". However, other TFS services work fine, for example work item queries.
I've uninstalled and re-installed VS (this time without Update2), and the problem persists.
I found a similar problem report, though it's somewhat different, and either way has no fix.
Debugging with Netmon, I noticed that affected machines use a different URI:
Good: /tfs/Protection/VersionControl/v4.0/repository.asmx
Bad: /tfs/Protection/VersionControl/v5.0/repository.asmx
What determines the URI the machine uses?
How can I change that?
Workaround: Close Visual Studio and related apps, then delete %LocalAppData%\Microsoft\Team Foundation\4.0\Cache.
Reason: (reconstructed from reports from my sysadmin...)
My TFS2012 RTM server was cloned from an existing server, keeping the same collection GUID. Effects:
The old server had Update1 installed and uninstalled. TFS2012 RTM only supported v4.0 URI, while TFS2012 Update1 added v5.0. So sometimes, clients would get confused and go to the old server, get the v5.0 URI, and keep that cached in ...\Cache\<guid>\LocationServiceData.config.
We've had TFS builds fail with "Can't copy activity logs", since they tried to copy to the old server.
Fix: Change the collection GUID at the new server, by running:
tfsconfig ChangeServerID /sqlinstance:<SQLInstanceName> /databasename:tfs_configuration
afterwards, people need to clean the cache one last time and that's it.

The type or namespace name 'Script' does not exist in the namespace 'System.Web'

I just deployed a website into IIS 7 (about which I am woefully ignorant), and upon trying to build the site, I receive this error. I did a little googleing and I saw an article that said I should put system.web.extensions.dll into the /bin. But, I also saw an article saying not to do that. I tried it anyway, but I just received a different error ('Resource cannot be found').
I am totally clueless as to what else to try
Can you use the "Publish" command in Visual Studio to publish directly to the site? If not, then use that command to publish to a similar site on your machine, then copy it to the customer site.
You should also look into the IIS Web Deployment Tool. It can copy an entire site, including IIS settings and any databases. It will be built into VS2010.
Go to control panel, then programs, turn windows features on or off, scroll down to Microsoft.net framework 3.5.1 expand, make sure both sub options are selected, this might help your issue.

Resources