I have made some changes and saved the sourcecode in my client computer but the code is not checked in.
I want to go back to default that I had the latest sourcecode before I made some changes.
It is one file only. How should I do it?
I'm using VS Community 2013 with Team foundation Server.
Thanks!
Use "Undo" from pending changes in the Team Explorer Window.
Related
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)
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
I'm was looking for the proper way to exclude folders/files from team foundation server (2012) using visual studio 2012. I found:
how-to-exclude-certain-folders-from-visual-studio-2012-detected-changes-list on stackoverflow. However the shown detect changes link is missing in my team explorer. There should be a detect changes link in the red circle as compared to the screenshot in the linked question
I could not comment on the original question to ask this, so I made a new one. Does anyone know where the detected changes link went. (and yes the project had pending changes when I tested)
That's not a verb ("detect changes"), it's a noun: "detected changes". Which are changes that were found on the filesystem by watching your activity, but will not be included in the checkin.
This occurs when you use a local workspace. You will not see it if you are using a server workspace, since you must pend changes manually.
If you have changes that were made on the filesystem that were not pended, and you would like to detect them, run tfpt online from the TFS Power Tools. Or convert to a local workspace, and find them in the detected changes tab.
I'm working on VS2012 & Team Explorer for VS 2012.
The problem I have is, if in case the TFS goes down, my solution would be offline & any changes I make would not show up in the Pending changes window.
I have checked for ways by which I can make TFS track the changes but none of them helped.
Things I tried:
Go online option in the context menu -> It displays a window with a list of all the objects & I would have to go through each one of them to identify which objects I would like to track which becomes tedious.
I tried installing the TFSGoOffline extension present here, but result same as mentioned in the above point.
Can I, by any way make TFS track the changes if TFS goes down or I want to work offline & then go online?
Are you making use of server or local workspace? This is a new concept introduced in TFS 2012, just to tackle the same problem that you are facing (tracking changes when TFS is offline). This is an excerpt from this LINK, which gives you a good explanation about Server vs local workspace:
Before Team Foundation Server 2012, all workspaces were considered
"Server" workspaces; in essence, in a Server workspace, when a file's
retrieved from TFS, TFS tracks which version of the file's on the
local machine, and the file is set to read-only. By setting the file
to read-only, the server is able to track exactly which version of the
file is stored locally.
One drawback to Server workspaces is the ability to work offline from
TFS. Each version of TFS has made strides to make offline work easier,
but, by design, Server workspaces work best with an online connection
into TFS.
TFS 2012 changes up the workspace options. Server workspaces are still
available, and work exactly has they have in previous versions.
However, TFS 2012 now contains a new type of workspace, called a Local
workspace. Again, this is an oversimplification, but in a Local
workspace, all the files are read/write, not read-only. The meta-data
about the files is stored in a hidden folder in the root of the
workspace, which allows edits, renames and deletes to be done locally
without any communication to the server.
If you edit your current workspace, you will be able to know whether you are using Server or Local workspace now. Check the images towards the end of the document.
Hope this helps!
When I am working and I lost connection, once I get the connection back again, I do a couple of things.
First, close my VS and re-open again.
If this doesn´t help,then from the TEAM menu -> Connect to TFS. This way he will re-read all your folders and my pending changes appear in the Team Explorer window.
You can maybe try to right click and Check In Pending Changes, maybe this way, TFS re-read again your changes.
As I said, for me this couple of things works ;) I hope that for you too
Our TFS server has some temporary connectivity issues right now, and as such VS has gone unresponsive, leaving 50+ developers unable to work!
Is it possible to switch TFS into an offline mode in the event of such an issue?
See this reference for information on how to bind/unbind your solution or project from source control. NOTE: this doesn't apply if you are using GIT and may not apply to versions later than VS2008.
Quoting from the reference:
To disconnect a solution or project
from source control
In Visual Studio, open Solution
Explorer and select the item(s) to
disconnect.
On the File menu, click Source
Control, then Change Source Control.
In the Change Source Control dialog
box, click Disconnect.
Click OK.
The 'Go Offline' extension adds a button to the Source Control menu.
https://visualstudiogallery.msdn.microsoft.com/6e54271c-2c4e-4911-a1b4-a65a588ae138
plundberg: The "disconnect" button is only available for the TFS provider starting in VS 2008. Even then, I'm not sure if it's officially supported. The recommended way to use the Go Offline feature is to [re]open the solution.
Martin Pritchard: if you get stuck mid-operation, you can force VS to timeout by pulling the network plug (literally) or running ipconfig /release.
Once you're marked offline, here's a step by step guide to working in that mode: http://teamfoundation.blogspot.com/2007/12/offline-and-back-again-in-vs2008.html
More detailed info on tweaking the behind-the-scenes behavior:
http://blogs.msdn.com/benryan/archive/2007/12/12/when-and-how-does-my-solution-go-offline.aspx
http://blogs.msdn.com/benryan/archive/2007/12/12/how-to-make-tfs-offline-strictly-solution-based.aspx
There are couple of little visual studio extensions for this purpose:
For VS2010 & TFS 2010, try this
For VS2012 & TFS 2010, use this
In case of TFS 2012, looks like there is no need for 'Go offline' extensions. I read something about a new feature called local workspace for the similar purpose.
Alternatively I had good success with Git-TF. All the goodness of git and when you are ready, you can push it to TFS.
Depending on which tool windows you have open, VS may or may not try to hit the team server automatically when it starts up.
For best results try this:
Close all instances of visual studio
Open an empty visual studio (no project/solution)
See which windows are opened by default, if source control explorer or team explorer or any other windows that use team are opened (and activated) by default, close them or switch them to a background tab.
Close visual studio
You should notice now that you can start visual studio without it trying to hit the TFS server.
I know its just an aside to your problem, but I hope you find this helpful!
If you have a solution open, and TFS is down, you might have trouble going into offline mode. If you close and reopen your solution, a nice little dialog will appear asking you if you want to Go Offline.
Alternatively if you don't want to close/reopen the solution, (as suggested by Bernie) you can install the TFS Go-Offline plugin, then click:
TEAM -> Go Offline
Simply, change the root folder name for your solution in your local machine, it will disconnect automatically.
I just wanted to include a link to a resolution to an issue I was having with VS2008 and TFS08.
I accidently opened my solution without being connected to my network and was not able to get it "back the way it was" and had to rebind every time I openned.
I found the solution here;
http://www.fkollmann.de/v2/post/Visual-Studio-2008-refuses-to-bind-to-TFS-or-to-open-solution-source-controlled.aspx
Basically, you need to open the "Connect to Team Foundation Server" and then "Servers..." once there, Delete/Remove your server and re-add it. This fixed my issue.
If the code has already been checked out by the user that if offline and they have the latest version on their local hd, then they just need to browse to the solution location and open the solution by double clicking sln file. The solution will open in disconnected mode.