team server foundation 2010 is only working in offline mode - visual-studio-2010

In my company, we are using Team Server Foundation 2010.
Last week when I was checking out some ssrs (sql server reporting services 2010) files, I obtained the correct files from TFS. I could see that the files were still connected to TFS.
However, I think there was a time last week where there was a message saying that I was working offline.
Now when I obtained the most current code from TFS, I do get the correct code. However I do not see that the code is connected to TFS any longer. Basically when using Source Control Explorer, I do not see that this code is linked to TFS
Thus I would like to know how to get my code back to accessed in TFS 2010?

Do you see the same problem with all files in TFS or only specific set of files?
Do you see this problem in only one workspace or in all workspaces on a single machine? Or does it affect all users?
What does it mean that files are not linked to TFS, can you post a screenshot?
TFS 2010 was quite weak story for offline and it worked only for solutions (as visible in Solution Explorer). Source Control Explorer always required connection to TFS

I'm also confuse about “files are not linked to TFS”you describle ,can you post a screenshot.
Simply offline mode means TFS 2010 goes offline (disconnect the connectivity properly between your local machine and TFS 2010 server) while your solution is already open though VS 2010.If you checkout files while you are in offline mode, then TFS 2010 source controls system doesn’t record or track any changes you made. But when you reconnect TFS server, the server will get you changes in pengding changes, then you can check in manually.
To get your solution back online to TFS you can try this solution:right-click on the solution name right at the top of the Solution Explorer and select the Go Online option.
More detail: How do I get my solution in Visual Studio back online in TFS?

You need to use the "go online" command to re-sync:
Cannot see go online option in tfs
Note: TFS 2010 is no longer supported and you should upgrade soonest

Related

Is there a way in Visual Studio and TFS to view items checked out to local workspaces?

I understand that TFS Local Workspaces are designed to help users work more seamlessly when not connected to the TFS server; however, unlike when using Server Workspaces, I cannot see the status of a file from Visual Studio Source Control Explorer. Our team is connected to the TFS Server 90% of the time. It seems that Local Workspaces should be able to communicate file checked-out status back to the TFS Server when connected. As a team manager I would like to know what files team members currently have checked out in several scenarios, while still retaining the flexibility offered by Local Workspaces.
I want to know how often team members are checking in their code (or not).
I want to know if someone is already working on a file before checking it out as well.
I want to handle a lost/broken laptop scenario by knowing which files had un-checked-in changes.
Is there a way to do this with Visual Studio Source Control Explorer or another tool?
Generally the items checked out will display automatically when you navigate to the specific items in Source Control Explorer. Reference below screenshot.
I want to know how often team members are checking in their code (or
not).
You just need to check the changesets history.
I want to know if someone is already working on a file before checking it out as well.
Just navigate to the specific items in Source Control Explorer as I mentioned above, it will shown the status in Pending Change column.
I want to handle a lost/broken laptop scenario by knowing which files had un-checked-in changes.
Generally the files with status displayed under Pending Change column are the files which have un-checked-in changes.
However there is a tool called Team Foundation Sidekicks which is a suite of tools ( includes Code Review Sidekick, Shelveset Sidekick, Labels Sidekick, History Sidekick, Workspace Sidekick and Status) for TFS administrators and advanced users providing rich GUI for administrative and advanced version control tasks, you can use it to check and track the things you required. (Unfortunately it's no available for VS 2017, the latest version 6.0 only works for VS 2015)

Visual Studio change Source Control from TFS back to VSS

Using Visual Studio 2015 I was previously working on a project which is in an old Visual Source Safe repository.
I needed to connect to a project in Visual Studio Online (Team Foundation Server) and so in Tools -> Options -> Source Control -> Plug In Selection I choose Team Foundation Server and successfully connected to the Visual Studio Online repository pulled down the code, worked on it and checked it in.
The problem comes when I need to access the project in VSS again. I tried to reverse the process. Setting the Plug In Selection back to Visual Source Safe. However even when I don't have a solution open the 'Team Explorer' is still connected to Visual Studio online and I can't connect back to VSS. When I open my VSS based project it is STILL connected to Visual Studio Online as well.
I don't have the option of moving the older project out of VSS just now (not my choice, I'm hoping it's going to change soon but not a choice I can make), and need to carry on working on it. I basically need to disconnect VS from VSO and can't, and can't connect to anything else instead.
Has anyone come across this problem and a solution to it? I've searched but only find answers about disconnecting a project from it's current source control, I don't want to do that, I want each project to remain with it's source control, but I need to be able to choose which source control VS is connected to.
Well I've found AN answer eventually, through trial and error... it's a bit of a faff.
First thing is I forgot that VSS doesn't use the Team Explorer. When I opened the VSS based project the project HAD actually connected to VSS, but the Team Explorer wasn't reflecting that. So I could carry on working on my VSS based project and just ignore Team Explorer.
However I still wanted to disconnect, because it had only been a one-off requirement to connect to that Visual Studio Online project.
What I did was...
1. Log out of my Microsoft account from Visual Studio.
2. Close and re-open Visual Studio.
3. Click close on the prompt to log in to my Microsoft account.
4. THEN the option to delete the connection was available in Team Explorer. Pretty sure it hadn't been there before.
5. Log back in to my Microsoft account.
Unfortunately I had also reset my Microsoft Account password in the trial and error, which I now think was unnecessary. I was just trying to force VS to stop connecting to that repository.
As Team Explorer is not use with VSS you may want to use "Team | Disconnect from TFS" to disconnect. Then switch your control...
Note: As VSS as been completely unsupported for many years you are incurring a significant business risk by staying with it. Have you raised this risk with your executive team? Do they know that their organisational asset is at risk?

TF31002 Can't connect to TFS online from VS 2012

Problem
I'm using VisualStudio 2012 Ultimate v11.0.50727.1 Update 4 and VisualStudio 2013 Ultimate v12.0.21005 EL and I'm able to connect to TFS through any browser. But suddenly I can't connect to TFS at xxxxx.VisualStudio.com from within VisualStudio anymore. Yesterday I easily did a Check-In at work with the same account. but I can't connect to TFS at home.
This is the URL I'm using: (I've tried changing it a bit like adding /tfs or /DefaultCollection)
I'm stuck with this, I've tried different ways but none have worked so far and it's still giving me these errors: TF31002, TF300324 and TF205020
TF31002 (this error happens when trying to Add a new server)
TF205020: Could not connect to server ‘https://xxxxxx.visualstudio.com/defaultcollection’. 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.
TF400324: Team Foundation services are not available from server https://xxxxxx.visualstudio.com/defaultcollection.
Technical information (for administrator):
The underlying connection was closed: An unexpected error occurred on a send.
(The last 2 errors happen when VisualStudio is trying to login to tfs)
I've tried these:
Go to VisualStudio.com and Sign out from all browsers
Delete Cookies and Caches of IE10 (and test when IE has signed in to visualstudio.com or signed out of it)
Go to Regedit and set the DWORD to 0 in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundation\Instances
Browse to %LocalAppData%\Microsoft\Team Foundation\4.0\Cache and delete everything
Delete all credentials from Windows Credential Manager (and remove Link Online ID)
Installed VS2013
Installed Team Explorer 2013
Installed VS2012 Update 4
Installed a fresh copy of Windows 8
What I want.
After some long and desperate time of trying to connect to TFS online, Now I'm just looking for a way to Check-in my changes. (doing it by hand is not an option because there's a large number of changes and I can't even know which files are changed since last check-in)
I just saw this link and it totally worked for me after nothing else would: http://www.cnblogs.com/CuteNet/p/3556276.html
regedit:
Close all instances of Visual Studio 2013
Delete this folder in the registry (just “TokenStorage” – nothing else):
HKEY_CURRENT_USER\Software\Microsoft\VSCommon\12.0\ClientServices\TokenStorage
I had similar issue where I couldn't connect (TF31002) to TFS 2010 using VS 2010, 2012 and 2013 on my laptop but can connect from web and other servers just fine.
I tried almost all suggestions given by various sources online but had no luck.
I was getting ready to reimage tha laptop but as one last try I started comparing config's between another virtual machine (where the connection was successful) to my laptop. I found that in my laptop I have additional defaultProxy settings in 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config’
<system.net>
<defaultProxy>
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://XXX.X.X.X:XXXX" usesystemdefault="false"/>
</defaultProxy>
</system.net>
After deleting the above node completely I was able to connect to TFS 2010 successfully.
Hope this helps.
I've found a way to check-in all changes of the home computer at work computer.
Copy the local TFS folder from home computer (including the hidden $tf subfolder) to work computer.
Install Team Foundation Sidekicks for 2012
Search for the home computer name
Click on Update Workspace Computer Name
Go to Source Control Explorer and open Workspaces...
Check Show remote workspaces checkbox (if the home workspace is not shown)
Edit the home workspace
Remove current mapping
Map $/ to the local folder (which has $tf)
When click on Advanced It should look like this:
Switch to the new Workspace and done!
It seems to me that private workspace is what causing the problem, and I will try to change it to public after I checked in.
Edit
I've found another workaround which requires no workspace hacks. (This method is originally designed for recovering from wrong check-ins)
In Source Control Explorer select root (collection, not project)
click Compare folders
in source version section choose the latest safe version
in target path section browse to the not-checked-in folder
make sure both paths end with same name (e.g. $/MyProj and E:\FromHome\TFS\MyProj)
(set any additional settings...) and click OK
DoubleClick on files with different value of Yes and write down the names of those file that should be loaded from local folder (right part of screen probably shows local)
Open those files from Solution Explorer and overwrite them with local files
I faced the same issue few days back
1. Disable your firewall(not recommended)
2. Run VS 2013 in admin mode.
3. Disable antivirus or add TFS in whitelist.
4. Select connect to TFS and create a new project in another directory (Local copy)
5. Check the directory for access(Read only by default change the permissions)
6. try to check in now.
After changing the permissions to the local directory i was able to check in my changes.
I was having the same issues using Visual Studio 2013 Update 2 and for me the problem was Anti-Virus software (Kaspersky Endpoint Security 8). See this link: http://blogs.msdn.com/b/dstfs/archive/2014/07/24/can-t-connect-to-visual-studio-online-from-any-version-of-in-vs-quot-the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-send-quot.aspx
Check your URL first!
I had a problem with such URL:
https://domain-name.com
Turns out that symbol "-" where replaced with some special char ­. But Visual Studio 2012(2013) did not indicate that anyhow. Apparently it was not able to find such domain. As result same issue TF31002 and a day spent in research.
I was having a similar problem with Visual Studio Premium 2013 connecting to our project from inside VS. It kept returning TF31002, but I could access it with a browser.
From the browser I went to Home->Activities->Open New instance of Visual Studio and my tfs project loaded right into the Team Explorer frame.
Hope that helps.
I had the same issue when I wanted to connect to the TFS with Visual Studio. This solved my problem:
I used a VPN connection to the server
I used the ip address instead of the link given by the TFS (http://"ip address":8080/tfs instead of http://"link":8080/tfs)

Visual Studio 2010 - TFS - Work offline also TFS server is available

I'm working in a big project in Visual Studio 2010. Often I must wait the check-in before doing simple test. How can I work with Visual Studio 2010 offline when TFS Server is available?
I'm not sure I understand your question 100%, but there are a couple of options depending on what you mean.
First of all, working offline is not possible with TFS 2010, but is available with local workspaces in TFS 2012 (overview in this article)
You say that you're waiting for check-in to complete. If you have a plain check-in situtation, then you have a couple of choices:
You can open a second instance of Visual Studio, and work while the first instance completes the check-in.
You can open a command prompt and use tf.exe checkin in your workspace directory.
If you have a gated check-in, then you can check the 'Preserve my pending changes locally', and you will be able to keep working on the changes until they have been validated and checked in. (further details in this article)
All that being said. A simple check-in should not take more than seconds. So if you're waiting a long time for a normal check-in situation, then you might have some performance/server issues.

Does TFS + VS 2010 support working offline and reconcile intelligently when online?

I am using Visual Studio 2010 Ultimate Ed. and it is hooked to TFS Server 2010. Can I simply do a 'get latest' of my solution, change my working mode to 'work offline' and work at home over the weekend.
When I get back to office I should be able to switch back to 'work online' and TFS should take care of any files I've supposedly checked out and help me reconcile. I cannot envisage what files I'll be working on while I'm offline.
Can this be achieved in my setup in a straight forward way?
Remote access to TFS is ruled out.
This will work fine - if Visual Studio can't connect to your TFS server it will switch to offline mode automatically. Upon reconnecting, you can tell it to work online and then check in the files you have changed (either a few at a time per check in or as one whole bundle). It will keep track of which have been edited.
It may inform you when opening the files that they are read-only, but that seems to be linked how it determines which have changed and you can override that per-file as you open them. I'd advise against removing the read-only attribute on any you don't change.
It might be worth simulating it before you rely on it so you understand how it works by disconnecting to your network while still at work.

Resources