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

前端 未结 9 549
别跟我提以往
别跟我提以往 2020-12-07 11:07

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 attemp

相关标签:
9条回答
  • 2020-12-07 11:22

    (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?

    0 讨论(0)
  • 2020-12-07 11:22

    You can go use registry editor.

    1. Turn off all VS instances.
    2. Open registry editor and go to: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundation\Instances
    3. Find proper server e.g: team32system1
    4. Go to Collection and nex DefaultCollection: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundation\Instances\team32system1\Collections\DefaultCollection
    5. Set Offline key to 0
    6. Open solution in VS. Afterwards pop up should appear which question would you like bring solution to online mode.
    0 讨论(0)
  • 2020-12-07 11:23

    i found another way without much effort.

    Just simply right click your solution and then click undo pending changes.

    Next, VS will ask you for acutally changed file where you want to undo or not specific file.

    In this you can click no for such a file where actual change is happende, rest is just undoing. This will not lost your actual changes

    0 讨论(0)
  • 2020-12-07 11:28

    Neither of the above solutions worked for me on Visual Studio Community 2017 v15.7.1. Somehow, there was no "Go Online" option in the context menu. I tried registry edit as suggested here, but that only displayed me error that it could not find the binding. What worked for me is rebinding solution to the server from Change Source Control menu.

    Go to File->Source Control->Advanced->Change Source Control and make sure that your solution is binded to your source control. If not (like mine) then click on bind button, it will automatically search online TFS server and rebind your solution to it.

    0 讨论(0)
  • 2020-12-07 11:33

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

    0 讨论(0)
  • 2020-12-07 11:34

    You will need to do two steps here for a complete solution

    First click on the Solution that you have open and then go File-> Source Control -> Go Online Then uncheck all the files that are being shown as being modified while you were offline.

    Don't do the Get Latest version from Source Control Explorer. That will result in a dialog potentially showing a bunch of files asking you to resolve conflicts. Instead do this

    In source Control explorer right click on the folder you want to get latest of and then Advanced - Get Specific Version. In the dropdown for version type choose Latest and then choose the first check box that says Overwrite writable files that are not checked out. This will automatically bring your folder in sync with latest on the server

    0 讨论(0)
提交回复
热议问题