Hi There,

Thank You for visiting my blog. I have moved this blog to a new address http://dattatreysindol.com/. Please visit the blog at new address and re-point your feeds to the new address to continue to receive regular updates.
Thanks,
Dattatrey Sindol (Datta)

Datta's Ramblings on Business Intelligence 'N' Life

Always Check-Out the Latest Version of Code from TFS

» 15 May 2011 | | |

When working with large teams, when multiple team members are working on the same project/module or the same piece of code, it is very essential that there is a strong version control system in place. And when it comes to Microsoft Platform, Visual Studio 2010 Team Foundation Server (TFS) is one of the most efficient version control tools available in the market.

When multiple developers are working on the same set of files, it is important that all the dependencies are taken care properly and before making any changes on the server, it is essential that we get a latest version of code from TFS to our local workspace, Check-Out the code and post that we can make changes and Check-In the code.

Often, when we perform a Check-Out operation in TFS, the workspace version of the code gets checked out, which sometimes may not be same as the server version due to various reasons like some other team member might have modified the file on the server, the developer himself might have modified the file in local (workspace version) without Checking-Out the latest version of file from server etc. As a result of this, when we simply perform a Check-Out operation without getting the latest version of code then we may end up losing the changes made by someone else on the server.

To avoid this, we can follow the below mentioned simple steps which will ensure that even if we just perform a simple Check-Out operation, TFS will get the latest version of code to our local workspace and  then does a Check-Out which is effectively checking out the server version of code.
  • Open Visual Studio 2010
  • Connect to Team Project on Team Foundation Server
  • Go to Tools -> Options...
  • Go to Source Control in the left navigation pane and expand it
  • From the expanded menu, select Visual Studio Team Foundation Server
  • Now check the checkbox "Get latest version of item on check out" as shown below

Now, even if you forget to get latest before doing a Check-Out, Visual Studio/TFS will automatically ensure that a latest version of code is downloaded to your workspace and then a Check-Out is performed.

This makes our life a lot more simpler !!!

Until next time, happy learning :)

Note: This demonstration is based on Visual Studio 2010 Team Foundation Server (TFS)

Readers Feedback:
Did you like this article?
If Yes, then please share it:
Did you like my blog?
If Yes, then please help spread the word by sharing this blog with your colleagues, friends, & anyone else in the MSBI Space: Like us on Facebook , Follow us on Twitter .

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

About the Author

Dattatrey Sindol is a BI Tech Lead & a passionate SQL Server Developer in a leading IT company.  read more »
Connect with Datta:

Thank You Visitors!

Hi There, Thanks for Visiting my Blog. Please feel free to leave your Comments/Suggestions about any of my Articles/My Blog.

Do Not Copy this Blog's Content !

Protected by Copyscape Online Copyright Checker