Reputation: 18898
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?
Upvotes: 255
Views: 139178
Reputation: 35
My issue was really simple. Just a sign in issue, my password had changed and I had to re-log in to the Teams server. After that, refreshing the server, all is well and normal.
Upvotes: 0
Reputation: 139
One method I did with mine, is to "Add to Source Control", and select 'Git'.
Upvotes: 0
Reputation: 156
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:
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.
Upvotes: 4
Reputation: 43
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
Upvotes: 0
Reputation: 410
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
Upvotes: 0
Reputation: 119
Go to File > Source Control > Go Online
, select the files you changed, and finish the process.
Upvotes: 10
Reputation: 308
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.
Upvotes: 2
Reputation: 1348
(Additional step from solution above for if you are missing the AutoReconnect or Offline registry value)
For Visual Studio 2015, Version 14
Additional info: blog MSDN - When and how does my solution go offline?
Upvotes: 7
Reputation: 99
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).
Upvotes: 9
Reputation: 45
You can go use registry editor.
Upvotes: 2
Reputation: 18898
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.
Upvotes: 538