Monday 17 December 2012

Get Specific Version in Visual Studio 2012


Having worked with Microsoft Visual Studio 2012 for some time now, I must say it definitely provides a much better development environment than earlier versions, both in terms of speeds and in usability. There are, however, a few things which I find annoying. One of them is the position of the "Get Specific Version" option from Source Code Explorer.

In Visual Studio 2010, the option was quite obvious … the second option at the top of the right click context menu.


In Visual Studio 2012, this is well hidden inside the Advanced option at the end of the context menu

A few people I know struggled in finding this option, so thought to blog about it.

Monday 10 December 2012

Visual Studio Designer and TFS Lock

If you have used XAML technologies (Silverlight, WPF, etc.) and Team Foundation Server (TFS), you would be aware of merge issues that might happen with multiple check-outs. The multiple check-out functionality is supported by it's ability to merge code changes. However, due to the nature of XAML code, it is tremendously difficult to get the merging right.

A workable solution is to disable file merging for XAML and XAMLX files. This can be configured through  Team Project Collection settings. If you are using Visual Studio 2012, clicking on the Source Control option shows the following option:


Click on the Add button and add the name and file extension for XAML and disable the option "Enable file merging and multiple check out".


Disabling this option means that TFS locks the file for all other users once it is checked out by anyone. If a user attempts to explicitly check out the a locked file, an error message is shown to the user. However, if the user attempts to do it implicitly by editing a file, the error is shown in the output window.

Now, here is something which I got me burnt today. For text based such as .cs, .xml, etc. the behaviour of Visual Studio 2012 is what I expected i.e. the file is locked for editing and it is very obvious that the files are not checked out. However, if the file is opened on visual studio designer such as Workflow files, Visual Studio still allows you to drag activities on to the designer but the file is not written to. So, keep an eye on the  lock icon .