Microsoft support for non Windows developers

During Build 2015 conference Microsoft announced Visual Studio Code, a free IDE to develop web, cloud and modern application. The nice aspect of VS Code is that it runs on every platform, here is a screenshot of Code running on a Linux Ubuntu box.


Figure 1: Visual Studio Code running on Linux box

I can now clone a git repository from my Visual Studio Online account and create a first Hello Node Js application. VS Code is not just an editor, and I’m able to debug my node.js code with easy.


Figure 2: Debugging node.js code in Visual Studio Code

VS Code has native support for Git, and I’m able to manage my repository doing push/pull/commit etc, directly from VS Code. Support is still basic, if you need a rebase you should go with CLI, but VS Code is still in preview, so I’m expecting more to come in the near future.


Figure 3: Create a commit directly from VSCode


Figure 4: I pushed changes directly from VS Code in VSO

You can use all VSO feature, if you like you can edit code directly from Web interface if you need to do a quick fix, or if you need to edit a Readme.MD file.


Figure 5: Editing in Web Interface in Visual Studio Online

Thanks to Visual Studio Code, and Visual Studio Online, you can manage your projects from your favourites environment.

Gian Maria Ricci

Team Project Rename

Renaming of Team Projects is one of the most requested feature on Visual Studio User Voice:


Figure 1: Team Project rename suggestion on User Voice

Today, Brian Harry announced new Visual Studio Online Update and it contains this feature, even if it will not be available to everyone at the beginning. For those people that uses TFS on-premise you will have this feature in the upcoming new version: TFS 2015.

I strongly suggests you to have a look at Visual Studio User Voice and give your suggestion, because it is in the radar of Visual Studio Team.

Gian Maria.

Professional Application Lifecycle Management With Visual Studio 2013

If you use or plan to use Team Foundation Server or Visual Studio Online, this is the book for you.

Professional Application Lifecycle Management with Visual Studio 2013 covers all aspects and tools of Microsoft ALM Ecosystem, giving you all the details on how to implement effectively ALM for your team/s. This book is dedicated to all people involved in a Software Project, from managers who plan work with new Portfolio Management features, to developers that create the product, and finally to testers and end users that could monitor quality with Microsoft Test Manager and Feedback Tool. Everything is explained clearly and with full details, making this book a perfect companion for everyday work.

Even you own previous editions, I strongly suggest you to buy this new one, because it covers all the new feature of TFS 2013. This new edition contains some brand news chapters to understand what Git offers as an alternative to TFVC for source control, as well as showing how to do Enterprise Agile with Portfolio Management or using Release management to deploy applications in production environments with a controlled and repeatable process.

Due to redesign of Team Explorer in Visual Studio 2013 and some other changes to existing features, all content of previous editions was updated and revamped to reflect latest bit of Visual Studio ALM 2013 Family.

If you use TFS or VSO is time to update your bookshelf.

Gian Maria.

Keep your Team Foundation Server upgraded to latest version

When it is time to maintain Team Foundation Server in small companies the major risk is “fear of upgrade”. In a small shops usually there is no dedicated resource to maintain TFS installation, usually you install the first time, schedule backup and everything is done. In small company maintenance is also simple, you usually have not big database and speed is not a problem with current hardware.

Some people also fear the upgrade, because they think it is a complicated process, they are not sure if they are able to restore the old version if the upgrade went wrong, and so on. First of all I suggest you to read the exceptional Upgrade Guide from TFS Rangers, it will explain almost everything you need to know about the upgrade, but I can also assure you that the upgrade process, if you are not still running an old TFS 2008, is not complex.

If you are a small company, probably all your TFS is a single machine with everything installed on it, with the only exception of build server, that usually is located in other machine.

Typical question that people ask before an upgrade are

*) What can I do if the upgrade will go wrong?

The answer is simple, first of all all data is stored inside Databases, if you have a backup all of your data is safe. If you installed TFS in a single Virtual Machine, just turn off the machine, create a snapshot, do the upgrade and if everything went bad, restore the snapshot.

*) What can I do to verify that the upgrade is really gone good?

If the procedure does not raise errors, you should try to do your everyday work, you should simply use Web Access, verify that you are able to do the automatic upgrade to process template to enable new features, use Visual Studio to access code and try to run your builds and verify that everything is ok. Remember to verify Reporting and Cube, because they are usually the most problematic area, together with SharePoint integration.

*) Can I test the upgrade while still running the old server?

The TFS Upgrade Guide has a section dedicated to how create a test upgrade environment to verify the upgrade. Basically you should be 110% sure to change id of cloned TFS to avoid confusion from Client Programs. If you have a Virtual Machine you can copy the disk and create another virtual machine with a private network, to be sure that you are

*) How much time does it takes to do the upgrade process?

This is a question that depends on so many factor. Hardware speed is the major parameter, but size of the collection is another important factor, and finally how old is your original server is another factor of speed.

My suggestion is, try to follow the update train, do not miss any update, because the most time passes between updates, the most complex the process can be. VS Team is also really committed to verify that each update work seamlessly over the last one. If you let too much time pass, it is possible that you should do a multi-step upgrade (Es TFS 2008, converted db to 2010, then to 2012 Update 4, then to 2013).

Gian Maria.

Programmatically use of Coded UI in Visual Studio

Coded UI Tests are a specific type of UI testing introduced with Visual Studio 2010. You can create your first Coded UI test following simple instruction from MSDN documentation. Most of the introductory examples shows you how you can use the Recorder tools to record interaction with a software (Web, WinForm, Wpf. etc) to generate what is called a UiMap. An UiMap is nothing more than a big Xml files where the recorder records the interaction with the UI and a bunch of automatic generated classes to interact with the UI.

Using a UiMap is probably not the best option for large projects, because the cost of maintaining it could become really high. This is usually not a big problem, because UiMap is used to generate code based on a set of classes belonging to Visual Studio Testing Framework that makes possible to interact with a UI from code. If maintaining a UiMap is difficult for you you can directly use these classes in your test. To show you the “hello world” equivalent of CUIT, here is the code needed to open a page in a browser and click an hyperlink.

using ( BrowserWindow browserWindow =
                new System.Uri("")
    HtmlHyperlink link = new HtmlHyperlink(browserWindow);
            "Model Airplanes"

The code is really simply, you must use the BrowserWindow.Launch static method to create an instance of BrowserWindow class pointing to a given Url. The BrowserWindow class is a wrapper defined Visual Studio Coded Ui assemby used to abstract the interaction with a web browser. The next step is locating the hyperlink you want to click, operation that can be accomplished with the HtmlHyperlink object. This object derives from the UiTestControl base class, and abstracts the concept of a control in the User Interface. The constructor of HtmlHyperlink object needs an instance of a containing control, in this example the whole browserWindows object. The need for the Container is having a root control that will be searched for the control.

To specify the exact Hyperlink control you want to interact with, you should populate SearchProperties collection, specifying the criteria you want to use. In this example I used the InnerText property, but you can use a lot of other criteria. Thanks to PropertyNames static collection of HtmlHyperlink object you can enumerate all the properties that can be used to locate the control. Inner Text is not usually the best option, using unique Id is usually a better approach, but the key concept is: You should use the criteria that is most stable in your scenario/environment. If you can ask to development team to assign unique id or unique names to each control, tests will be more robust and quicker.

Once SearchProperties collection is filled with critera, you can interact with the control, accessing properties or passing it to Mouse.Click method to simulate a click. CodedUI engine will locate the control on the page only when You will access properties or pass the control to some method that interact with it. This is really important, until you do not access properties the engine will not try to locate the control on the UI.

Remember to enclose the BrowserWindow object in a using block, this will ensure that the instance of the browser opened during the test will be always closed. This prevents multiple browser windows to remain opened after the test if some exception occurred.

Gian Maria.