Wednesday, October 31, 2012

Another nice Team Foundation Server 2012 feature: formatted activity log

Last week, when I was checking the outputs of a failing build, I found another nice new feature in Team Foundation Server 2012. The build activity log is now combined with a nice xsl file, which gives you a formatted output when you open the ActivityLog.xml directly from the File Explorer.


So you no longer need to open up Visual Studio to see all the things that happened. Nice!

Tuesday, October 30, 2012

Team Foundation Server 2012: Configure security to access data warehouse

Team Foundation Server gives you a rich set of reporting data available through reporting services and excel reports. If these out-of-the-box reports are not sufficient for you, you can always connect directly to the TFS data warehouse. Microsoft did a great job in improving the data warehouse structure to make it easy to browse through all available info and create your own queries. The easiest way to do this is by using the Analysis services integration in Microsoft Excel. Just follow the wizard and you get all the data you’ll ever need…


However there is one extra step you need to do before users can complete this wizard successfully, you must grant these users read access to the databases that make up the data warehouse. You can grant access to the analysis services database, the relational database, or both, depending on what types of reports will be created.

To grant a user or group read access to the analysis services database
  1. On the Start menu, point to All Programs, click Microsoft SQL Server 2008, and then click SQL Server Management Studio. SQL Server Management Studio starts, and the Connect to Server dialog box appears.

  2. In the Server type list, click Analysis Services.

  3. In the Server name box, type the name of the analysis services server for Team Foundation Server, and then click Connect. The Connect to Server dialog box closes.

  4. In Object Explorer, expand the server's Databases folder, then expand the Tfs_Analysis database, and then expand the Roles folder.

  5. Right-click the TfsWarehouseDataReader role, and then click Properties. The Edit Role dialog box appears.

  6. Under Select a page, click Membership, and then click Add. The Select Users or Groups dialog box appears.

  7. Add the user or group, click OK, and then click OK.

To grant a user or group read access to the relational database
  1. On the Start menu, click All Programs, click Microsoft SQL Server 2008, and then click SQL Server Management Studio. The Connect to Server dialog box appears.

  2. In the Server type list, click Database Engine.

  3. In the Server name box, type the name of the data-tier server for Team Foundation Server, and then click Connect.

  4. In Object Explorer, expand the server's Databases folder, and then expand the Tfs_Warehouse database.

  5. Under the Tfs_Warehouse database, expand the Security folder, then expand the Roles folder, and then expand the Database Roles folder.

  6. Right-click the TfsWarehouseDataReader role, and then click Properties. The Database Role Properties dialog box appears.

  7. Under Select a page, click General, and then click Add. The Select Users or Groups dialog box appears.

  8. Add the user or group, click OK, and then click OK.

Monday, October 29, 2012

Windows 8 and Windows Azure Virtual Labs available

Interested in testing all the new features in Windows 8 and/or Windows Azure? But you don’t want to spend a day installing all required prerequisites? Then the MSDN Virtual Labs are the solution you need. They enable you to quickly evaluate and test Microsoft's newest products and technologies through a series of guided, hands-on labs that you can complete in 90 minutes or less. There is no complex setup or installation required, and best of all, it’s free!

Windows 8 Virtual Labs
  • Lab 1 for C# - Creating a Windows 8 App

    Contoso Cookbook is a series of hands on labs designed to immerse you into Windows 8 app development. In this first lab in the series, you will use XAML and C# to create the application, implement navigation, download the data from Windows Azure (or load it locally if you don’t have an Internet connection), and connect the data to controls using data binding.

  • Lab 2 for C# - Orientation, Snapping, and Semantic Zoom

    In this lab, you will build upon Lab 1 by adding three important UI-related features to Contoso Cookbook. First, you will customize the layout of the item-detail and group-detail pages when the screen is rotated. Next, you will customize the layout of the item-detail page when the application is snapped. Finally, you will implement semantic zoom in the start page, enabling users to zoom out and see all the recipe groups on a single screen.

  • Lab 3 for C# - Searching and Sharing

    In this lab, you will add support for searching and sharing to Contoso Cookbook. You will get first-hand experience implementing searching and sharing contracts, and learn how these contracts provide a higher level of integration between either two apps or an app and Windows itself.

  • Lab 4 for C# - App Bars and Media Capture

    In this lab, you will enhance Contoso Cookbook by allowing users to capture photos and videos of their favorite recipes and share them with other applications. You will also add an application bar that provides shortcuts to these features and learn how to incorporate popup menus into application bar commands.

  • Lab 5 for C# - Process Lifetime Management

    In this lab, you will learn about Process Lifetime Management. Process Lifetime Management, or PLM, is one of the most important concepts for a developer building Windows Store apps to understand. Unlike traditional Windows applications, which continue to execute even when they are in the background, Windows Store apps only execute when they are in the foreground.

  • Lab 6 for C# - Settings and Preferences

    In this lab, you’ll add About and Preferences commands to the settings pane in Contoso Cookbook. You’ll expose a simple user preference that can be toggled on and off with a toggle switch, and you’ll use roaming settings to store that preference so it will follow users wherever they go.

  • Lab 7 for C# - Tiles and Notifications

    In this lab, you will get first-hand experience with secondary tiles, push notifications, and toasts by adding them to Contoso Cookbook. At the conclusion, users will be able to pin favorite recipes to the start screen with secondary tiles, see tiles updated by the Windows Notification Service, and see scheduled toasts in action.

  • Lab 8 for C# - The Windows Store APIs

    In this lab, you will use the Windows Store APIs to monetize Contoso Cookbook. First you will modify the about box to detect trial versions and include a purchase button if the app has not been paid for. Next, you will use CurrentAppSimulator to simulate a purchase when the purchase button is clicked. Finally, you will simulate in-app purchases by offering Italian recipes as a paid add-on rather than for free.

  • Lab 9 for C# - Touch and Pointer Input

    In this lab, you’ll take a preexisting photo-editing app named Contoso Photo and add touch support to turn it into a fully functional application. You’ll add support for simple gestures such as taps and double-taps, and you’ll build in support for pinch-zooms as well as for dragging and panning. In addition, you’ll make sure all of it works with a mouse so the application is equally at home on devices that lack touch screens. Sound appealing? Then let’s dive into the world of touch and see what it takes to build a great touch-enabled app.

Windows Azure Virtual Labs

Friday, October 26, 2012

Improve your application performance by doing nothing(or almost)

One of the optimizations you get for free in the new .NET Framework 4.5 release is Multicore JIT compilation.  Today, the assumption is that you have at least two processors. This feature takes advantage of this extra processing power by using parallelization to reduce the JIT compilation time during application startup.
If you want to get all the details, check the following post
Enable Multicore JIT for your ASP.NET web applications
For your ASP.NET web applications it’s easy, you have to do nothing. Once your application/webserver is upgraded to ASP.NET 4.5, your application start up will go faster. Microsoft took into consideration that ASP.NET applications runs in a hosted environment, so they turned on Multicore JIT for these applications automatically. So if you're running ASP.NET 4.5, you don't have to do any extra work to turn on Multicore JIT.
If you want to turn Multicore JIT off in your ASP.NET 4.5 applications, use the new profileGuidedOptimizations flag in the web.config file as follows:
<?xml version="1.0" encoding="utf-8" ?> 
 <!-- ... --> 
  <compilation profileGuidedOptimizations="None" />  
  <!-- ... -->  

Enable Multicore JIT for your Windows client applications
In a Windows client application, all you need to do is use the System.Runtime.ProfileOptimization class to start profiling at the entry point of your application—the rest happens automatically.

public App() 

The SetProfileRoot call tells the runtime where to store JIT profiles, and the StartProfile call enables Multicore JIT by using the provided profile name. The first time your application is launched, the profile does not exist, so Multicore JIT operates in recording mode and writes out a profile to the specified location. The second time your application launches, the CLR loads the profile from the previous launch, and Multicore JIT operates in playback mode.

Thursday, October 25, 2012

New branching and merging guide available

The ALM Rangers have released their new Branching and Merging Guide.

Release notes:

What is new?

Quality-Bar Details
  • Documentation has been reviewed by Visual Studio ALM Rangers
  • Documentation has been through an independent technical review
  • Documentation has been reviewed by the quality and recording team
  • All critical bugs have been resolved

imageimage image

For more information on this project, please visit the Codeplex project.

CQRS–Frequently asked questions

Last week I discovered,  a great site if you are interested in CQRS and have lots of questions.

“ The ideas around CQRS are fascinating, but different enough from the way we do conventional development that some questions come up again and again. This page collect a number of such questions that we've encountered, and attempts to give accurate and satisfactory answers to them.”


Wednesday, October 24, 2012

TFS 2012 Build: Configure NUnit to run your unit tests

With the release of Visual Studio and Team Foundation Server 2012, it becomes a lot easier to use other test frameworks than MS Test. Now it becomes possible to run NUnit, XUnit,… tests directly from Visual Studio using the same tooling and interface.

But how do you configure your build server to run these tests?
  1. Download the NUnit Test Adapter from the Visual Studio Gallery(
  2. Install the adapter vsix on all your build servers.


  3. Add the nunit.core.dll, nunit.core.interfaces.dll, nunit.util.dll and NUnit.VisualStudio.TestAdapter.dll to a folder in source control. Set this folder as the Version control path to custom assemblies. This can be managed by clicking “Manage Build Controllers” on the Build menu. Click on properties and set the correct path in version control.


  4. Using VS 2012, edit your build definition, go to “Process”, click on “Test Source”, and then click on the ellipses to bring up the “Add/Edit Test Run” dialog box. In the “Test runner:” drop down, select “Visual Studio Test Runner”. This will use the new multi-framework compatible test runner that works with NUnit, MSTest, xUnit, and other testing frameworks.


  5. That’s it!

Tuesday, October 23, 2012

Internet Explorer 10 is coming to Windows 7 (but later then expected)

I probably missed the announcement somewhere, but last week I saw this post by Rob Mauceri mentioning that IE10 will become an update for Windows 7. That’s great news, I was afraid that Window 7 users would have to miss the goodness that IE 10 offers.


That was the good news, the bad news is that we’ll have to wait longer as expected(most people thought that IE 10 would become available to Windows 7 after the Windows 8 release).

To quote Rob Mauceri, Group Program Manager, Internet Explorer:

“As we approach general availability of Windows 8, we want to provide an update on IE10 for Windows 7. We will release a preview of IE10 on Windows 7 in mid-November, with final availability to follow as we collect developer and customer feedback.”

So no official release date yet Bedroefde emoticon.

Monday, October 22, 2012

Windows Azure Training Kit October 2012 Release

With all the new features that keep being added to Windows Azure, it’s hard to stay up-to-date. But Microsoft makes our live easier by releasing a new version of the Windows Azure Training Kit every few months.

This month they are back with the October 2012 update. It  includes 47 hands-on labs, 24 demos and 38 presentations. Some of the updates in this version include:

  • Updated 22 presentations with speaker notes
  • Added 7 new demo scripts for content delivery
  • Added navigation page for demo discoverability
  • Updated hands-on lab page sub-navigation

So this time, no new features, but some useful guidance how to teach the content to others…

Friday, October 19, 2012

SUCCINCTLY SERIES: A collection of great free e-books

Syncfusion publishes the Succinctly series concise technical books that target developers working on the Microsoft platform. Each book is around 100 pages and is guaranteed to enlighten you on the topic of interest. Download your free copy today(you’ll have to register but it’s worth it).

New releases are coming out every few months but today they offer the following books in this series:


Thursday, October 18, 2012

Visual Studio 2012: Design Patterns UML diagrams

Last week I discovered this great Visual Studio extension: Design Patterns UML Toolbox

Provides Visual Studio 2012 UML toolbox items representing the majority of the Gang of Four design patterns. The patterns are split into Creational, Structural and Behavioural sections, and includes a supporting UML profile.

The extension adds new toolbox items to the UML toolbox.

More information:

Wednesday, October 17, 2012

Send an email in WinRT

Sending emails in WinRT is easy, you only have to create a “mailto” –uri and launch it:
var mail = new Uri(""); 
await Windows.System.Launcher.LaunchUriAsync(mail);

If you also want to define a subject, body or other fields, you can further extend the querystring:
var mail = new Uri("mailto:? subject&body=Some other content."); 
await Windows.System.Launcher.LaunchUriAsync(mail);
That’s all. Not the most programmer friendly interface, but it works…

Tuesday, October 16, 2012

Caching images in WinRT

WinRT will out-of-the-box cache all the images you download for your. The cache will automatically be used when you set the image source to a URL:
If you set the same URL again then it will automatically use the cached image if it has already been downloaded once.
But what if you don’t want this behavior? Ian Walkers blog brings us the answer:
He has found that adding a dummy querystring to the BitMapImage source filename reference does the trick and also can offer precise control over the length of caching required .
For example, if you want to cache your images for an hour, add the following to the image path:
“?Cache=” + System.DateTime.Now.DayOfYear.ToString() + System.DateTime.Now.Hour.ToString();

The BitmapImage class also has some properties that allow us to control the caching behavior:

BitmapImage bi = new BitmapImage();

// Begin initialization.

// Set properties.
bi.CacheOption = BitmapCacheOption.OnDemand;
bi.CreateOptions = BitmapCreateOptions.IgnoreImageCache;

// End initialization.

When IgnoreImageCache is selected, any existing entries in the image cache are replaced even if they share the same Uri.

The BitmapCacheOption offers you the following options:
Member nameDescription
DefaultCaches the entire image into memory. This is the default value.
OnDemandCreates a memory store for requested data only. The first request loads the image directly; subsequent requests are filled from the cache.
OnLoadCaches the entire image into memory at load time. All requests for image data are filled from the memory store.
NoneDo not create a memory store. All requests for the image are filled directly by the image file.

Monday, October 15, 2012

Forcing a NuGet Package to update

By default NuGet skips updating a package when there is no higher version number. This brought us into trouble because we changed a package without updating the version number(only the file version had changed). So all our developers had to remove and re-install the package.

Until NuGet 2.1 there was no way to force an update regardless. NuGet 2.1 addresses this with the ‘reinstall’ flag.

Let’s have a look at the sample from the NuGet 2.1 release notes:

Previous versions of NuGet would result in the following when attempting to update a package that did not have a more recent package version:

PM> Update-Package Moq

No updates available for 'Moq' in project 'MySolution.MyConsole'.

With the reinstall flag, the package will be updated regardless of whether there is a newer version.

PM> Update-Package Moq -Reinstall

Successfully removed 'Moq 4.0.10827' from MySolution.MyConsole.

Successfully uninstalled 'Moq 4.0.10827'.

Successfully installed 'Moq 4.0.10827'.

Successfully added 'Moq 4.0.10827' to MySolution.MyConsole.

Friday, October 12, 2012

My first Windows 8 app: POW! Comic Book Reader

Last week I released my first Windows 8 app: POW! Comic Book Reader.
POW! Comic Book Reader is here to give you a great reading experience on Windows 8. Browse through your local comic books and read them using a simple and user friendly interface.
  • Manage a list of recent comic books
  • Open CBR, CBZ, RAR and Zip files
  • Page reader
  • Full screen mode
Some screenshots

Thursday, October 11, 2012

A great example of Responsive Web Design:

Maybe it’s something you would not expect but is a great example of Responsive Web Design. Let’s open it up on a range of devices and just for fun we’ll do the same thing for

This is how the sites look on my 24” screen:

image image

And this on my 15” laptop screen:


And this on my 10” tablet:


And this on my mobile phone:


Enough said? Glimlach

Wednesday, October 10, 2012

Team Foundation Server 2012: Multi-Proc build

When you are creating a new build definition in TFS 2012, you’ll notice that a new build setting is added to the MSBuild options:


The MSBuild Multi-Proc setting allows MSBuild to build multiple projects in parallel. This setting is not new but now it’s easy accessible  without the need for extra customization.

Biggest advantage of enabling this setting is speed. I noticed a big decrease in build time(for large projects) with a factor 2 to 4.

Remark: Be careful when enabling this property, in some situations I started to get ‘Access Denied’ exceptions as multiple projects tried to write to the same folder concurrently.(And I noticed that I’m not the only one with problems when enabling this setting.)

Tuesday, October 9, 2012

WinRT: No FindSystemTimeZoneId available.

The TimeZoneInfo class in the regular .NET Framework has the FindSystemTimeZoneId method. It allows you to specify a TimeZone id and return the related time zone information.
// Get Brussels Standard Time zone 
TimeZoneInfo tst = TimeZoneInfo.FindSystemTimeZoneById("Romance Standard Time"); 
A list of Time Zone id’s can be found here:

However if you try to execute this code in WinRT, you’ll notice that the FindSystemTimeZoneById method is not available.

The reason could be found in the same MSDN documentation:
“FindSystemTimeZoneById tries to match id to the subkey names of the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones branch of the registry under Windows XP and Windows Vista. This branch does not necessarily contain a comprehensive list of time zone identifiers.”
I’m assuming that this registry key is not available from WinRT. So anyone who knows an alternative way to get this information?

The only solution I can think of is doing a call to the server and calculate the TimeZoneInfo there…

Monday, October 8, 2012

Team Foundation Server add-in for Word

Last week the ALM Rangers released their first version of the Team Foundation Server Word Add-in. The add-in allows you to import work items from a Team Foundation Server Team Project and generate professional-looking Word document from TFS Work items.


The add-in needs to know which fields you want to display in the document and how to place the fields of the work item in the document. This is called a Layout. The add-in installs some sample layouts to help you get started. You can customize the existing layouts or create new ones.


For more information, please visit the TFS Word Add-In Codeplex project.

Future Plans

  • Visual Studio 2012 and Team Foundation Server 2012 support
  • Bi-directional support to read work items from and write to Team Foundation Server

Friday, October 5, 2012

All training kits in a row

On June Tabadero’s blog, I found the following useful blog post: a list with all the currently available free Microsoft Developer Training Kits.

Enough for months of learning…


Go and have a look

Thursday, October 4, 2012

Error.stack: a JavaScript stacktrace

By default, JavaScript error handling will not give you much (extra) information. One way to get some extra info is by using the Error.stack property. Error.stack, while not a published ECMAScript 5 standard, is broadly supported on the web, and enables the developer to readily drill down into errors. This can quickly show you where the problem originated, and will help you to walk the call tree back to where the error condition began. This can be especially useful if you send the client side errors back to the server to store them somewhere and want to debug the problem later.
Imagine you try to execute the following code(which will fail because d does not exist):
function a() {
 return d;

function b() {
 return a() * 5;

function c() {
 return b() * a() * b();


If you wrap this in a try-catch block and write-out the stack trace, you’ll get the following info:

This will already get you a lot further when you try to find the root cause of an obscure Java Script error. Currently this property is supported on the following browsers: Chrome, Firefox, IE 10, Opera, Safari.

More information:

Wednesday, October 3, 2012

What’s new in .NET Framework 4.5?

Looking for a quick and easy overview of the new features in NET Framework 4.5? Jouni Heikniemi created a poster with all the new stuff.

Tuesday, October 2, 2012

TFS 2012: Work Item ‘Description’ field is readonly in Excel

After upgrading to TFS 2012 users noticed that the Description field became read only in Excel. Before the migration they were able to upgrade this field in Excel without any problem.


Why is this field readonly?

I found out that during the migration to TFS 2012 the ‘System.Description’ field is changed from ‘PlainText’ to ‘HTML’.  The advantage is that you now have rich text support when creating and editing the description field of your work item. The disadvantage however is that ‘HTML’ fields are not editable in Excel.

More information:

Monday, October 1, 2012

Windows 8: Open Type Fonts are not supported

Some things you have to find out the hard way.

I blogged before about how to embed a custom font in your Windows 8 application. So we followed these steps to add another font to the application, but no luck, no matter what we tried we couldn’t get it working.

So what could be different from the original font we tried to embed? It took us some time to discover the one and only difference; before we were using a True Type Font(.ttf) and this was an Open Type Font(.otf). After switching to the same font in ttf format(using a converter didn’t work), our new font was finally there.

Lesson learned: Open Type Fonts are not supported on Windows 8.