How do I get my solution in Visual Studio back online in TFS?

125,567

Solution 1

I searched for the solution online and found this solution but wasn't too keen on the registry change.

I found a better way: right-click on the solution name right at the top of the Solution Explorer and select the Go Online option. Clicking this allowed me to select the files that had been changed when I was offline and make the solution online again.

After finding the solution, I found the following msdn forum thread which confirmed the above.

Solution 2

Go to File > Source Control > Go Online, select the files you changed, and finish the process.

Solution 3

Rename the solution's corresponding .SUO file. The SUO file contains the TFS status (online/offline), amongst a host of other goodies.

Do this only if the "right-click on the solution name right at the top of the Solution Explorer and select the Go Online option" fails (because e.g. you installed VS2015 preview).

Solution 4

(Additional step from solution above for if you are missing the AutoReconnect or Offline registry value)

For Visual Studio 2015, Version 14

  1. Turn off all VS instances
  2. HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\TeamFoundation\Instances{YourServerName}\Collections{TheCollectionName} (To get to this directory on Windows, hit the Windows + R key and search for "regedit")
  3. Set both the Offline and AutoReconnect values to 0.
  4. If you are missing one of those attributes (in my case I was missing AutoReconnect), right click and and create a new DWORD(32-bit) value with the desired missing name, AutoReconnect or Offline.
  5. Again, make sure both values are set to zero.
  6. Restart your solution

Additional info: blog MSDN - When and how does my solution go offline?

Solution 5

I am using Visual Studio 2017 15.4.0 version. Especially when i started use lightweight solution option, this offline thing happened to me. I tried to above solutions which are:

  1. Tried to regedit option but can not see appropriate menu options. Didn't work.
  2. Right click on solution, there is go online option and when i choose it that gives this error message: "The solution is offline because its associated Team Foundation Server is offline. Unable to determine the workspace for this solution."

Then from File -> Source Control -> Advanced -> Change Source Control. I saw my files. I select them and then chose bind option. That worked for me.

Share:
125,567

Related videos on Youtube

Appulus
Author by

Appulus

I develop software, and manage processes and teams, and do a whole raft of other interesting things.

Updated on July 08, 2022

Comments

  • Appulus
    Appulus almost 2 years

    I had my solution in Visual Studio 2012 (which is under TFS source control) open and the TFS server (2010) was down. When I then made a change to one of the files and attempted to save it I got a prompt to ask whether I wanted to Overwrite the file saying the TFS server was down (can't remember the exact words) and the following message appeared in the Output window:

    This solution is offline.  [Team Foundation Server: http://tfs1:8080/tfs/server]
    The solution was offline during its previous session and will remain offline.
    

    How do I get the file change to be recognised as being among Pending Changes and the whole solution back online?

  • Nick N.
    Nick N. about 11 years
    Worked for me, thanks a lot. It would be weird to get into the registry for this.
  • Tony Abrams
    Tony Abrams almost 11 years
    I really needed this today. Thanks for providing an answer. Worked great.
  • m-smith
    m-smith almost 11 years
    Worked for me, but the programsurfer link is broken.
  • Thad
    Thad almost 11 years
    programsurfer link is broken
  • Appulus
    Appulus almost 11 years
    Thanks @LordScree and @DavidGardiner; have updated the registry change (ProgramSurfer) link to one that still works (which was actually another one I came across at the time).
  • Nordes
    Nordes over 9 years
    stackoverflow.com/questions/261525/… I preffer the following page than that solution ;). Good to rebind all the csproj
  • Daniel
    Daniel about 9 years
    There was no option to go online when I clicked on the project name. However, clicking on My Project had that option.
  • jhenninger
    jhenninger about 9 years
    I was having this issue too, but did not see the option to Go Online. I found this msdn article article which explains how to "establish or reestablish a source control link between a solution/project and the version store".
  • Mike Harris
    Mike Harris almost 9 years
    Save me today. Thank you!
  • intrepidis
    intrepidis over 8 years
    lol... I love the way this answer is worded. Hilarious, and accurate too. Nice.
  • Bartosz
    Bartosz about 8 years
    Go Online didn't work for me (that's the first thing I tried) - I had to edit registry as per nurhak-kaya.blogspot.de/2012/10/…
  • Beauty
    Beauty over 7 years
    There was no option to go online when I clicked on the project name. A RESTART of Visual Studio helped in my case.
  • Adrian
    Adrian over 7 years
    Why doesn't this show up first. I almost missed this answer. :(
  • W. Young
    W. Young over 6 years
    This is the best answer and also works in Visual Studio 2017. No need to edit the registry.
  • Admin
    Admin over 5 years
    Worked for me in VS2013
  • Dôn Kayt
    Dôn Kayt over 3 years
    I use your solution but the problem persists. To resolve it, I go to : - Explorer (Windows Logo + E), - Looking for my TFS folder - Right Click on the Folder with Status : Inactive (to understand it have a look at File -> Source Control -> Advanced -> Change Source Control into VS 2019) - Team Foundation Server -> Add Back at VS 2019: - Unbind your Solution/Project and bind it again. Finish.