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

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.

Related

Recover files (changes) after "undoing pending changes" in visual studio 2015

I had about 20 files pending changes in my solution in Visual Studio 2015,I had a problem with repository so clicked on "Undo pending changes" thought I had already had shelved my changes. After undoing pending changes I noticed that I hadn't created any shelveset of those change.
I googled a bit about it and I found this link How can I get my changes back after clicking “Undo pending changes…” in Visual Studio 2013 and TFS
I tried the solution mentioned in answers of link above but there is no TFSTemp folder in my AppData\Local\Temp folder do notice that I'm using Visual Studio 2015 but the user asked this question is using Visual Studio 2013. Maybe vs 2015 store TFSTemp in different location but where ???
Any Idea about how I can get my changes back???
Any help would be greatly appreciated
The TFS Temp folder should be the same path "AppData\Local\Temp\TFSTemp". It's not related to VS version. If you could not find it in your own account, give a try with Admin account (If the VS run in Admin mode)
You should be checking in frequently or setup some sort of backup system to avoid mistakes like this. If the files are gone from your file system, they're gone. Maybe a file recovery utility could do the trick, but the solution is too complicated. Besides past that, there's no way to get them back.

Is it safe to keep working in Visual Studio whilst doing a check-in?

I've been through all the Visual Studio Source Control documentation and so on but I can't find an answer as to whether it's safe to keep working in Visual Studio whilst it's doing a check-in?
We're using Visual Studio 2015 with Visual Studio Team Services source control.
Sometimes there's one or more files (like video files) that take a while to check in, sometimes an hour or more. I'm worried that if I keep working (specially if I work on the same files that are busy checking in) it'll corrupt the process.
Normally, it is safe as TFS won't check the changes again after you click check-in button. It just check in the changes you made before click check-in. So edit the file does not affect the check in process.
But in some case, for exmaple, the internet access is disconnected during check-in, then you click "Refresh" button to reconnect to TFS service. The changes will be refreshed too. That means the changes you made during checking is been included now. And there isn't any way to restore to the version that you'd like to check in.
So, you'd better avoid this as possible as you can and check in large files when you are not working with them.

team server foundation 2010 is only working in offline mode

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

Why would TFS 2013 Check-In notes field not show for some users in the Team Explorer?

We currently have our Source Control settings set to enforce a Check-In Note called 'Reviewer' is set for every check-in in our projects.
However, for two of my developers, the Reviewer field is not showing up, and they can check in their changes without having to fill in the field!
I've cleared the Cache (as mentioned in many posts, this one in particular) on one of the developer's machines, but this did not correct the problem.
I've grabbed the "devenv /log" output from both developers and compared it to mine, but nothing jumps out at me there either - the versions of Team Foundation assemblies that both are loading into their IDE's are the same as mine, and any 'Power tools' that we load are also identical other than tools that we don't share at all.
We are using TFS 2013 Update 3, and Visual Studio 2012 Update 4, Visual Studio 2013 Update 4. The Developers on my team might typically switch between VS2012 and VS2013 at least once a week.
When you have a custom check-in policy, everyone will need to have that check-in policy installed on their development workstation.

Gated Checkin: Sheving the Sources causes rollback in Visual Studio

One of our developers discovered something very strange in Gated Checkin Builds which seems to be a feature of Gated Checkins.
When launching a Gated Checkin, the solution in his Solution Explorer seems to go back to the last Version Checked in. After the build is completed Visual Studio shows an error or success message with the button in German called "Code aufnehmen" (in English: "Reconcile...")
After clicking he gets back his changes.
I know that in Visual Studio you can choose to revert your solution when shelving it. It appears to me that this is what Visual Studio does by default.
Is it possible to set Visual Studio or TFS to not revert after shelving for Gated Checkins?
Or maybe someone can tell me the reason why Visual Studio does it.
The whole process with Gated checkins is that TFS:
Constructs a Shelveset with all changes
Tries to Build the latest state of the codebase + this Shelveset &
If all succeeds, Shelveset gets commited into the repository
By default, TFS will revert the Developer's workspace into the last checked in during this operation. This can be changed with the following: By doing this, Developer can directly continue working, but once the build is over trouble & conflicts may arise when reconciling the local workspace.In general, gated builds should last as less as possible. If this principle is kept, the reaswonable way to proceed is to avoid setting the "Preserve"
option. If the Build last longer, than -say- 5 mins, it might be worth doing so. A very nice description of the Gated Checkin functionality can be found in this article by P.Carnahan.

Resources