Thursday, November 28, 2013

[VS2013 - .NET 4.5.1] Visual Studio 2013 Launch Event in Paris

After the launch in New York City two weeks ago, I was this Tuesday at the Paris Visual Studio 2013 Launch event. The event took place the whole afternoon at the conference center of Microsoft France. There were around 500 attendees, including some special guests, such as Brian Harry and Ed Blankenship, who presented all the new features to the audience !

The event was a big success and I was very happy, that the company I work for Cellenza had its own booth. We had changed our logo and website just before the event, so I was happy with the new design, which I find to be quite appealing.

2013-11-26 11.25.09

We had a little quiz going and you could win some interesting gifts, there were also free USB keys for people responding to the quiz! You have to have some fun activities to attract people to your booth and winning some goodies always works great.


I was impressed by the number of people responding to our quiz, I think this was a good success. We had the opportunity to meet a good amount of people and to exchange on different subjects.


The agenda was packed with news, announcements and some quite interesting subjects, as you can see below:

  • Transforming software development in a world of devices and services,
  • New features in Visual Studio 2013 and Team Foundation Server 2013
  • ALM and Windows Azure
  • How to develop great Windows 8.1 applications using Visual Studio 2013
  • Deezer : Success of a French music streaming company
  • Integrate your GIT projects within Team Foundation Server 2013
  • Questions and Responses with Brian Harry, Ed Blankenship and Jean Marc Prieur
  • Cocktails

The GIT presentation was done by Michel Perfetti, who is working with me as Manager at Cellenza. I was very proud that Cellenza had been selected as exclusive partner for the event.


Here are the slides in French:


Friday, November 15, 2013

[VS Online] Visual Studio Online Monaco

During the Visual Studio 2013 launch event Microsoft announced the global availability of Visual Studio Online and on top of that also a new incubation project with the code name Visual Studio Online Monaco.

This blog posts aims to show you the capabilities that Visual Studio Online Monaco provides in its early stages and how you can to try them out.

Windows Azure Website Creation

First of all we are going to create a Windows Azure website to test and to assess the Visual Studio Online Monaco features. To do that you have to sign in to your Windows Azure account (remember that you have free credits if you have a MSDN subscription).


Use the “Quick Create” option to create a Windows Azure Website in your region for our example. This should only take seconds.


You have to configure the created website to enable modifications from within Visual Studio Online. This is currently only available in Preview mode, so options or behaviors might still change and the service can be canceled at any time. So take caution and do not use this feature for your production websites.


Do not forget to save your changes. You are now ready to test Visual Studio Online Monaco, so lets get started !

Edit your Windows Azure website using Visual Studio Online Monaco

The easiest way of editing your Windows Azure website within Visual Studio Online is by clicking on the button that has been added to the Dashboard tab in the Windows Azure portal. You can find it on the right hand side at the bottom of the following screenshot.


After the login procedure your are presented with the following welcome screen. You may read the 4 Quick Start tips that are displayed to get additional information.


You may now click on the hostingstart.html page to edit it directly within your browser. Yes, the IDE is within your browser in this case ! You do not need to have Visual Studio installed. It will work even from you tablet or mobile phone (even with non-Microsoft operation systems ! This is quite handy if you need to quickly apply basic updates to your websites for example.


As you see you have full color coding in place. you may edit existing files,  create new files, create new folders, upload files, use specific IDE commands and much more. The editor is currently somewhat limited, but in some cases exactly what you need. Note that all your modifications are saved as you type them, no need to save by yourself.

Lets take a more closer look at the menu options on the left hand side.


You have already used the Explore option before. It provides access to the files and folders as well as to the IDE for editing code source.

The Search option allows for searching within your files and your project.


The Git option serves to connect to an existing Git repository within Visual Studio Online or to initialize a new one with just the press of a button.


I have actually initialized a new Git repository, so now I am presented with a commit screen where I need to add a comment and check-in my changes. You see that I currently have selected the master branch. I could also create sub-branches and use the full power of Git. But lets leave it simple for our example.


The last four menu options at the bottom allow me to run and see the output of my changes and to open up a console to execute commands. Here is a list of all the commands that are currently supported.


To conclude our little example you may now open your modified website and you will see that the title of the webpage has been updated as expected.


I have tried to give you a very quick and brief overview of Visual Studio Online Monaco. I hope you are as interested as I am. I will keep you informed when I have additional information and when the preview advances.

Here is a good series of webcasts done by the Channel 9 team :


Thursday, November 14, 2013

[VS2013 - .NET 4.5.1] Brief summary of the Visual Studio 2013 Launch Event

I have had the honor to participate during the Visual Studio 2013 Launch event yesterday the whole day. And what an exceptional event it was !!! Everything was planned very well and the show was amazing ! This is New York style, I can tell you that I was quite impressed !

The event was invitation only and there were around 200 attendees. Cellenza was the only French partner present. Since I was invited personally with Arnaud Hego, I am happy to give you a brief summary of what has been announced and what has been shown. I will then try to get into more detail in the next weeks and do dedicated blog posts for the most important and most interesting new features.


The first surprise was that all participants got a Surface Acer W510 as present !! It had been customized to contain our names at the back and on the front as a desktop background as well as an installed application with multiple information on the event (schedule, speakers, new VS2013 features, etc…).


We had breakfast and then everybody got to the main hall where the keynote took place. This was an impressive stage with animations. Very entertaining !



S. Somasegar, the corporate vice president of the Developer Division at Microsoft, was the speaker for the keynote, which was streamed live to the internet. He announced all the new features and asked other members of Microsoft to go into more details and show demos. The whole keynote was quite refreshing, because they did not only present Powerpoint presentations, instead they showed the new features directly within Visual Studio 2013. You can find his blog post on the Visual Studio 2013 Launch here. Channel 9 has also a very interesting Video that does a recap on what has been announced, you can see it here.


Here is what has been announced and demoed during the keynote in the morning:

  • Visual Studio 2013 and .NET 4.5.1 are now globally launched and available for purchase and download on MSDN, they are now fully supported and you may use them in your production environments
  • Visual Studio Online is now also officially available (formerly known as Team Foundation Service)
  • Erich Gamma (Gang of Four) showed a demo of Visual Studio Online Code Name "Monaco" (look here for more information)
  • Scott Guthrie showed how Windows Azure and Visual Studio 2013 work perfectly together and how this can be an asset to business applications
  • Scott Hanselmann showed how ASP.NET Web Development has been optimized and streamlined with Visual Studio 2013
  • Xamarin ships with Visual Studio 2013 with benefits for MSDN subscribers, it provides Visual Studio add-ins so that you can develop your iOS, Android and Windows apps all in a single solution using pure C# code (look under
  • Jay Schmelzer explained how to create Office 365 Cloud Business Apps using the new dedicated project template that has been added to Visual Studio 2013
  • Brian Harry spoke about how to enable continuous delivery, what a modern lifecycle with DevOps lloks like, how to do loadtests online or in the cloud and how release planning and management that has been added to Visual Studio 2013
  • We also saw Visual Studio Online Application Insights which is in a very early development stage and which can be tested as closed Customer Preview

The afternoon was dedicated to breakout sessions with Scott Guthrie on Windows Azure and Brian Harry on ALM and continuous delivery. I had the opportunity to speak to Brian and to talk about his intervention during the launch event in Paris the 26th of November together with Cellenza. He is going to speak together with Michel Perfetti, so we had the opportunity to getting to know each other. He is quite a friendly guy. I am looking forward to seeing him at the end of the month.


The end of the day was brilliantly finished by a party in the Penthouse of the dream hotel in New York City. The Microsoft teams showed some innovative projects and all participants had a great time getting to know each other and exchanging on all the new features that were presented during the day.


You see that there is an enormous amount of new features that Microsoft pushed through Visual Studio 2013. I am going to write some dedicated blog posts in the next weeks so stay tuned if you are interested in seeing those features in action.


Monday, October 21, 2013

[VS2013 - Visual C#] Visual Studio 2013 Launch Event

Microsoft has made available Visual Studio 2013, .NET 4.5.1 and TFS2013 as RTM versions since the 17th October. You may download the trial versions and MSDN subscribers can download the licensed product from the MSDN portal. You can learn more about what is new in Visual Studio 2013 on my blog or on the official what’s new website.

Next month Microsoft is going to launch Visual Studio 2013. The official launch event will be the 13th of November in New York. I have been invited exclusively to assist the event live in New York. This is a great honor since invitations are very rare, so I am very proud of having been chosen. Furthermore, there are only two French partners that have been invited by Microsoft and Cellenza is one of them !


I am going to communicate live from the event on my Blog and on my Twitter and on the Cellenza Blog. You may also assist virtually to the keynote speech using this webpage You are even able to watch the keynote in multiple languages !

I am very excited to participate in the event and I am going to try to share everything I see with you as soon as I can. Please let me know if you go to the event and we might get a drink together.


Tuesday, September 10, 2013

[.NET 4.5.1 - C#] Visual Studio 2013 RC, Team Foundation Server 2013 RC and .NET 4.5.1 RC are now available

The Visual Studio 2013 and Team Foundation Server 2013 Release Candidate go-live versions are now available !

The Visual Studio 2013 Release Candidate can either be installed as new installation, on top of the Visual Studio 2013 Preview version or side-by-side with your existing Visual Studio 2012 installations.


Visual Studio 2013 RC still supports the Windows Azure SDK 2.1 but it does not support Windows 8.1 Preview or Windows Server 2012 R2 Preview anymore. If you want to use either of them you have to install the RTM versions from MSDN or TechNet (more information here).


You can download the Visual Studio 2013 and Team Foundation Server 2013 Release Candidates from here:

Furthermore, the .NET Framework 4.5.1 Release Candidate is now also available for download with a go-live license, that enables you to deploy 4.5.1 RC applications in production.

This is a major step forward for the next version of the .NET Framework. After testing and trying all the new features, you are now able to deploy your Proof-Of-Concepts to production.

You can download the .NET 4.5.1 Release Candidate from here:

You may install it on top of the .NET 4.5 Preview that was released end of June.

There are no additional features since the Preview release, instead all newly introduced features are now finished and should have good quality.


Monday, July 29, 2013

[Publication] New ".Net Framework 4.5 Parallel Extensions Cookbook" Book is now available in English

I am happy to announce, that the English book “.Net Framework 4.5 Parallel Extensions Cookbook”, which I have technically reviewed, is now available in the Packt Publishing online store. You may buy it as eBook and paper book.

If you are interested in .NET 4.5 and Parallel Programming, this book is for you since it contains everything necessary for you to master this technology quickly. Examples and explications provide thorough information on all new features. I personally have reviewed all of the examples and I hope they will give you all insights you expect.

.NET 4.5 Parallel Extensions Cookbook

Here is the table of contents (look under the “Table of Contents” tab):

Chapter 1: Getting Started with Task Parallel Library
Chapter 2: Implementing Continuations
Chapter 3: Learning Concurrency with Parallel Loops
Chapter 4: Parallel LINQ
Chapter 5: Concurrent Collections
Chapter 6: Synchronization Primitives
Chapter 7: Profiling and Debugging
Chapter 8: Async
Chapter 9: Dataflow Library

If you have bought and read it, please let me know what you think.


Friday, July 5, 2013

[Visual C#] How to test your applications using the Fakes Framework (3/3)

In this blog post of the series I am going reproduce the same test scenarios as shown in my last blog post. Only this time, I will not modify the initial source code to make it testable but instead use the Fakes Framework Shims to test it as it is.

Fakes Framework Sims

Note that Shims get generated the same way as Stubs and that they can also be restricted by applying filters in the SampleCode.fakes xml file.

The internal mechanisms are however quite different and innovative. They even differ from other existing mocking frameworks. So how does it work ? In fact, original method calls are intercepted and redirected at runtime to the methods that are defined in the associated Shims.

In our example, we are able to redefine the calls to the methods that are tightly coupled to external sources without any actual code modifications. As you might remember, the concerned methods are IsValid(…) and Save(…).

The first test could be expressed as follows when using Shims :


Here is an explanation of the unit test code for the example above using Shims :

  • We use a ShimsContext in a using block to limit its lifetime and to dispose it correctly. All calls to the IsValid(…) and SaveDeal(…) methods are only redirected if they are declared within the using block.
  • We do not use proxy classes anymore, instead we use the code that is implemented in the DealRepository constructor. However, we have to redefine the constructor code because in the original code we return an exception (see previous blog post of the series).
  • Methods can be “replaced” by other methods. Those replacement methods have an additional parameter, when compared to the original method. This parameter defines the instance of the object that undergoes the redirection.
  • The result is that the initial code has not been modified but we were able to isolate and test the TrySave(…) method nonetheless.

I would like to add that Shims can also be used for static classes, sealed classes, generics, etc.. as easy as I have shown above. You can even generate them for standard .NET framework classes, such as System.DateTime and System.Configuration.ConfigurationManager for example (with the exception of the classes that are in “mscorlib”  and “system”). This allows for some really powerful use cases.


The example has shown that using Shims for your unit tests is easier and quicker compared to Stubs. There are no software design requirements so it seems the preferable solution. But it has its drawbacks ! You miss the opportunity to improve your code. One of the main advantages of TDD gets lost: refactoring you code to produce good quality code.

So refactor your code and use Stubs whenever possible. If you cannot modify your code (you have legacy code) or if you need to mock .NET Framework.classes use Shims. The Fakes Framework is the only unit test framework  that provides both approaches at the same time. This is a real advantage when compared to RhinoMock or MoQ.


Wednesday, July 3, 2013

[Visual C#] How to test your applications using the Fakes Framework (2/3)

Now lets start using the Fakes Framework by implementing a real live scenario. In the following example I am going to show you some legacy code, which has some software design flaws. I am going to apply TDD and SOLID concepts to improve code quality and then use Fakes Framework Stubs for testing it.

Then in the next blog post of the series I am going to show you how to test source code without any code modifications by using Fakes Framework Shims. This is especially interesting for code that cannot be modified or that requires too many modifications and which is thus too expensive to improve.

Refactoring badly designed source code

The BusinessService class has the responsibility to store Deals in the database if they are valid :


As you see it uses two other business classes : the DealValidator class for deal validation and the DealRepository class for saving a deal to the database. If a deal is not valid an exception is thrown. Furthermore, a bool with the False value is returned, if a deal cannot be saved to the database.

Here are the implementations of the classes, without any actual source code. The methods only contain a not implemented exception. We are going to mock those objects later, so no need to implement them completely here. Even more, by doing it like this, we have the opportunity to validate that they are not actually called. We do not want to have them called, when we unit test the BusinessService class, since they are part of its external dependencies (as explained in the first part of the blog series).


The Deal class is a simple data transfer object (DTO) :


Lets analyze the software design of this simple example : the BusinessService class and the DealValidator, DealRepository and Deal classes are tightly coupled as it is implemented here. This is bad design and a violation of the SOLID principles. To be more specific it violates the Dependency Inversion Principle (DIP).

The first thing to do now, is to modify the code to make it adhere to the DIP principle and thus improving its quality. When applying TDD and writing unit tests, you have to isolate the code that has to be tested (System Under Test). So if we want to unit test all the methods of the class, we have to decouple its methods from the rest of the source code. In the end the DIP principle gets automatically respected.

To achieve this goal we are going to do some dependency injection. First we use Interfaces to serve as abstraction layer between the BusinessService class and the DealValidator, DealRepository and Deal classes :


The business classes and interfaces code looks now like this :


You are now ready to use the Fakes Framework to test your code. This is what we are going to do in the next step.

Fakes Framework Stubs

Now that the BusinessService class has been completely decoupled, we can use Fakes Framework Stubs for unit testing it. After creation of a new unit test project and after adding a reference to our business code project, we generate the Fakes Framework library by right-clicking on the reference and selecting “Add Fakes Assembly”.


Visual Studio 2012 automatically adds the following to the project :


  1. A library called CodeSample.Fakes, which contains the auto-generated Stubs and Shims classes. Those are going to be used as proxies in our unit tests.
  2. A reference to Microsoft.QualityTools.Testiong.fakes.dll, which contains all the core components of the Fakes Framework.
  3. A Fakes folder, that contains a file called xml CodeSample.fakes. This file allows to impact the automatic generation of Stubs and Shims.

For our example we declare that Stubs have only to be generated for Interfaces :


We may now implement unit tests using the Stubs that were auto-generated above in the CodeSample.Fakes.dll.

The following unit test will return True when the TrySave(…) method is called and a deal has been validated and saved (which is the case in our example) :


Lets see how that works in  detail : in the Setup step we initialize the IRepository and IValidator interfaces by using the corresponding Stubs. Note that the classname is “Stub” and then the name of the interface to substitute.

Then we simulate a save and validation operation that has been  successfully finished. To do that we define that the Save(…) and IsValid(…)  methods return always True.

In terms of naming conventions, methods are suffixed by the type name of their input parameters. In our example the IsValid(…) and Save(…) methods have both as input parameter IDataObjet, so they are named IsValidIDataObject(…) and SaveIDataObject(…).

Finally, we use the Stubs from above to instantiate a BusinessService object (also doing some constructor injection) and we test the TrySave(…) method to validate that the result is conform with our scenario.

In the next example, we test that the TrySave(…) methods calls a validator :


To achieve this, we are using the variable validatorWasCalled, which we initialize to the False value. The test is validating that the variable is set to True during the processing in the corresponding Stub when calling the TrySave(…) method.


Friday, June 28, 2013

[Visual C#] How to test your applications using the Fakes Framework (1/3)

As already mentioned on my blog multiple times, one of the ways of having good quality code is to use the Test Driven Development (TDD) approach. I have shown you how to apply the TDD using Visual Studio 2012 in a tutorial on my blog here.

When talking about TDD we have to talk about unit tests. Testing your code correctly can be very complicated sometimes and even nearly impossible to achieve. This is especially true for legacy code, which might not adhere to best practices such as loosely coupling and abstraction.

To help you with these kind of problems, Microsoft has created the Fakes Framework. It will aid you to create good unit tests for new code that you write (via Stubs) but also for legacy code (via Shims).

This blog series aims at presenting you the benefits of using the Fakes Framework. It can also be used as tutorial to start using it in your daily work.

What is a good unit test ? How to handle coupling to external sources ?

One of the main problems when writing unit tests is the dependency on external sources such as databases, external components, web services and even method calls within the same class.

For example, if you write a unit test that queries a database, how to handle data inconsistencies or database unavailability ? The unit test will fail in these cases, even if the code is implemented in an efficient and correct way ! This is due to the fact that the unit tests does not test the code in an atomic way, but instead it tests the code as well as all of its external dependencies. But conceiving and implementing atomic unit tests absolutely necessary to assure consistent and correct test results.

So how do we create unit tests that are independent from external sources ? We apply mocking ! This means replacing the real external sources by fake sources (also called Shims or Mocks) within your code. You do connect to the database anymore during your unit tests, for example. You substitute and mock the data objects (such as POCO, DataSet, DataTable, etc…) containing the database query results and your unit tests become decoupled.

We have solved one important problem, but we have added another since we need now to be able to create mock objects easily and quickly. Your unit tests will have better quality but if mock creation takes too much time it will have a negative impact on developer efficiency. The Fakes Framework allows for the automatic creation of mock objects, thus eliminating the cited problem.

What is the Fakes Framework ?

The Fakes Framework is the next generation of the Moles & Stubs project, which was created by Microsoft Research. Please note that the Moles & Stubs project is not supported in Visual Studio 2012 anymore, but you may very well use it in Visual Studio 2010 of course. The Fakes Framework is only included in Visual Studio 2012 Ultimate and you have to modify your existing Moles & Stubs code since it is not compatible out of the box. The basic functionalities are the same but nonetheless much has been improved and modified. The Moles are now called Shims for example !

By using the Fakes Framework development teams can create quickly and efficiently unit tests. Two different approaches are provided: Stubs and Shims.

Stubs are substitute objects that help to isolate the code that needs to be tested. To be able to use them correctly, you have to have loosely coupled classes in your code. This can be achieved by using interfaces for example. Stubs are very well adapted to new code.

Shims are very different, because they allow the interception of method calls during runtime. This allows mocking objects and function calls , which could normally not be done. Shims are very well adapted to legacy code.

Here is a comparison between Stubs and Shims and their provided functionalities:




Interception Mechanism

Virtual Methods

Runtime Instrumentation

Static Methods / Sealed



Internal Types



Private Methods



Static Constructor / Finalizers









Abstract Methods




Thursday, June 27, 2013

[.NET 4.5.1 - C#] New features in the .NET 4.5.1 and Visual Studio 2013 Preview

The next version of the .NET Framework is .NET 4.5.1. It has been published as Preview version as announced yesterday during the BUILD conference. This blog posts aims to present what has been added, modified and improved in this new Framework version.

The .NET Framework 4.5.1 Preview is the first update of .NET Framework 4.5. It contains critical fixes, improvements, and opt-in features and is part of the Visual Studio 2013 and Windows 8.1 Previews. But it is also available as direct download without the requirement of having an existing .NET Framework 4.5 installation.

Visual Studio 2013 and .NET 4.5.1 language based improvements

The following language based improvements that have been added to the Visual Studio 2013 and .NET 4.5.1 Previews :

  • X64 edit and continue is now possible (with some restrictions, but now X86 and X64 are nearly handled the same, which is good news)
  • Async/Await debugging has been added (such as support in the Call Stack window, Tasks window, etc…)
  • Managed return value inspection has been added (in the Autos and Watch windows it allows for easier return value debugging)
  • Windows Store application development improvements (compatibility with Windows 8.1, Win RT improvements, etc…)
  • ADO.NET idle connection resiliency has been added (rebuild broken idle connections with SQL databases automatically and transparently)
  • ASP.NET application suspension has been added (Idle sites are suspended from CPU activity and are paged to disk)
  • On-demand large object heap compaction (instruct the Garbage Collector to compact the large object heap, as part of the natural GC or a forced GC)
  • Multi-core JIT improvements (support for dynamically loaded assemblies)
  • Consistent performance after .NET Framework updates (application startup performance will be more consistent after a .NET Framework update)

Installation of Visual Studio 2013 and .NET 4.5.1

The installation of the .NET 4.5.1 Preview can be done by installing the Visual Studio 2013 Preview in which case it will be automatically installed with the Visual Studio components. Note that it will replace existing .NET 4.5 installations since it is an in-place upgrade.

  • Download the ISO for Visual Studio 2013 Ultimate Preview from here (you may also install any of the other version available if needed).


  • After downloading the ISO, you may now start the installation. The installation will require a high amount of empty hard disk space (in my example 14GB !!).

Install VS 2013    Install VS 2013 2

You may also just install the in-place upgrade directly on your test server without the full Visual Studio development environment. You can download it from here.

You are now ready to start you evaluation of the new features within Visual Studio 2013 Preview and .NET 4.5.1 Preview !

Future language upgrades now also possible via NuGet

Future language updates will be shipped via upgrades and service packs as it is already done today. They will also be available via component specific NuGet packages. This allows for a maximum of flexibility concerning your upgrade strategy. If you do not want to wait until language upgrades are fully available, you may partially upgrade your language components via NuGet packages depending on your specific customer needs.

Furthermore, you can now retrieve NuGet packages for the .NET Framework 4.5.1 and above on Windows Update (it will not work for earlier versions of the .NET Framework). This provides are very easy and efficient way of getting the latest upgrades for the packages that you use. Note that upgrades will only be serviced for NuGet packages that are actually used by your applications.


The .NET 4.5.1 Preview Framework update provides some fixes and multiple  performance enhancements. There are no major language features, but nonetheless those upgrades become very handy and will allow for a more seamless and productive software development experience. I think that the next big language features that we can expect will be around Roslyn, when it will finally be finished and shipped as RTM version. But we will see !


[VS2013 - .NET 4.5.1] Preview of VS2013, TFS 2013, .NET 4.5.1 and Windows 8.1 annouced during Microsoft's BUILD conference

Yesterday during the BUILD conference in San Francisco one of the main major news was the announcement of multiple new product versions for you preferred development platform and operation system (Visual Studio 2013, Team Foundation Server 2013, .NET 4.5.1 and Windows 8.1). 

They are in Preview state and you can download them from here:

Those are preview version, which means that there is no support and that the final version could still be modified. In the past we have already seen that APIs have been changed and new functionalities been added to final versions.So you should use them for educational purpose only.

I have installed those versions in a VM to be able to test them and to give you some feedback on my blog. I am going to show you some of the new features in action in the next days/weeks. So stay tuned if you are interested in this topic.


Friday, May 17, 2013

[WinRT - Prism] Prism for Windows Runtime goes live !

This Friday 17th of Mai “Prism for Windows Runtime” is going live. This project is also known under the code name “Kona” by the patterns & practices team. It provides guidance on how to develop Windows Store Business Applications (basically Windows 8 applications).

It contains information on how to build loosely coupled, maintainable and testable applications based on the MVVM pattern for Windows Runtime (WinRT) with a focus on Line of Business (LoB) and Business to Consumer (BtC) applications.

Prism for Windows Runtime contents

  • A sample application “AdventureWorks Shopper” representing a real Windows Store application that you might find in the Windows Store. It has gone through the same approval processes all Windows Store applications have to go through.
  • This sample application demonstrates all the aspects of what Prism for Windows Runtime contains and how to apply them to your applications.
  • The Microsoft.Practices.Prism.StoreApps library, which contains code for implementing the MVVM pattern on WinRT. This means base classes, pages, ViewModels, a ViewModelLocator, application state management, validation, search and settings charms, etc...
  • The Microsoft.Practices.Prism.PubSubEvents library, which is basically the Prism 4.0 CompositePresentationEvent pub/sub events code moved to a Portable Class Library (PCL).
  • Quickstart examples and a thorough documentation

I was working on it together with Microsoft and the other members of the Developer Guidance Council in the lasts months, so I am happy to announce that it is available for the public now.

The release announcement on the blog can be found here:

The final resources (code, documentation, examples, etc…) can be found here:

The official CodePlex site can be found here :

You can also find a Channel 9 webcast on the subject :

There is also a Pluralsight course "Building Windows Store Business Apps with Prism" by Brian Noyes available here :

I will show you some examples in the next weeks if I get the time to prepare them for you. But if you can’t wait, just download the guidance from CodePlex and play with it. It is really easy to use and should give you all information necessary to build effective and robust Windows Store applications.


Monday, April 15, 2013

[C# and Win8] How to develop your first Modern UI application Part 3: Function declarations & Windows Store Deployment

In the last part we saw how to develop our first Windows 8 Modern UI application. I showed you how to create a very basic Image Viewer application. This part will show how to use system features (such as access to system resources or external devices) and how to deploy your applications via the Windows Store.

Application Manifest for Windows 8 Modern UI Applications

By default Modern UI applications do not have any access rights to system resources or external devices. You have to specifically allow and authorize those operations within the Application Manifest. In our example we had to edit the Package.appxmanifest file, as explained in the last blog post.

This declaration is especially important if you want to add your applications to the Windows Store. In fact, during the acceptance process, Microsoft verifies that the available functionalities are fully mentioned in your application description.

This is done to assure that everything is coherent, because Users need to know what access rights are required, if they want to install your applications from the Windows Store. Then they are able to decide if they want to download and buy your applications.

There are mainly two types of functionalities, for which access rights can be declared in the Application Manifest :

  • General functionalities : Media Files, Pictures Library, Removable Storage, Microphone, Webcam, Localization, Internet Connection, etc...


  • Advances functionalities : My Documents, Enterprise Authentication, Certificates, Share Targets, Background Tasks, etc...


You have to know that if you provide access to the advanced functionalities, then Microsoft will analyze your application in more details before your it can be made available on the Windows Store.

Windows Store Deployment

The Windows Store is the centralized and unique software distribution platform for Windows 8 applications. Customers find all sorts of Modern UI applications in the store. You can get more information here:

As already mentioned, applications are validated before they can be distributed via the store. This allows a high quality and controlled security access for all applications present on the store. There is a whole acceptance process, that each application has to comply on before it can be put on the Windows Store. It assures that applications work correctly, that they use only the accesses that are declared in the application description and that they comply to certain Modern UI design rules.

The validation is done by specialized Microsoft teams. It includes a thorough technical review, which aims at prohibiting malwares and viruses as well as unnecessary security accesses. Thus, a Windows Store customer may be confident to buy anything from the store without any risks of bad impact on his system.

Before you can distribute you applications on the store, you have to create a user account within the Dev Center for Windows Store Apps :

The are two types of user accounts: individual accounts and enterprise accounts. You have to know that only enterprise accounts can submit applications using advanced functionalities.

After the account creation you are now able to submit your first application to the Windows Store via the the “Submit an App” button. Choose a name for you application, enter a meaningful description and apply for the technical review.

After Microsoft has validated and tested your application it will be available on the Windows Store. That’s it you are now ready to build you own Windows 8 Modern UI application and distribute on the Windows Store.


Monday, April 8, 2013

[MVP Nomination] Third year as MVP Visual C# !!!

I am proud to inform you that I was awarded Microsoft MVP Visual C# again 2013. This is the third year as MVP, but I am still very excited, happy and honored for being selected MVP !!!


I want to take some time and thank my MVP Lead for having me nominated.

Also a big thank you to Microsoft for putting their trust in me. I will do my best and continue sharing my knowledge with the community. So be prepared for many new blog posts and articles in the technical press on Software Architecture & Design, Visual C# and Windows Azure, which are my main interests. I will also continue concentrating on speaking at conferences so I would be glad to see you at any Microsoft events (TechDays, MS Days, etc…). This year I am also working on several books !

Stay tuned and continue following me if you like this Blog !


Tuesday, March 12, 2013

[Guide] Visual Studio Test Tooling Guidance
Better Unit Testing with Microsoft Fakes

The ALM Rangers have recently published a guide on their page “Visual Studio Test Tooling Guidance” with best practice on Unit Testing and the Microsoft Fakes Framework with thorough examples and Hands-On Labs called “v1.0 - Better Unit Testing with Microsoft Fakes”.


I really recommend looking into the guide since it contains a rich set of information on how to start using the Fakes Framework as well as how to use it in advanced scenarios.

And if you are already reviewing guides, please also take a look at all the other guides that are available on the site such as :


Happy reading and feel free to add comments with other guides that you find useful around software testing and especially the Microsoft Fakes Framework.

If you don’t know what the Microsoft Fakes Framework is, please stay tuned, since I am going to give you a first overview of its features and some examples in a future blog post series on this subject in the next weeks.


Friday, February 1, 2013

[Publication] Article in French Programmez Magazine on Fakes Framework with Visual Studio 2012

You can find an article of 4 pages on how use the Fakes Framework with Visual Studio 2012 in the French Programmez magazine No.160 written by Fathi Bellahcene and me.

First Page and Second Page (low resolution)

Third Page and Fourth Page (low resolution)

The article is written in French but as always I will write some English articles on my Blog in the next weeks. So stay tuned if you are interested in getting to know how the Fakes Framework can help you when you need to test your code (especially if you are keen on TDD).


Wednesday, January 23, 2013

[C# and Win8] How to develop your first Modern UI application
Part 2: Source Code & Development

In the last part we discussed how to create your first Modern UI project and all the prerequisites for being able to start its development. In this part you will actually see, what developing this type of application really means.

Development of the Image Viewer application

For this tutorial we are going to create an Image Viewer application. The goal of this example application will be to display all the images in your local Pictures Library. You may reuse the skeleton project, that we have created at the end of the last blog post and apply the following steps to it.

Add some code that gets data from your local Pictures Library and execute your application. A best practice in Modern UI applications is to always use an asynchronous approach, which is why we use the GetFilesAync() method and the await keyword in the following example :


You will see that there is an exception of type “System.UnauthorizedAccessException” :


Modern UI application do not have any access rights by default, which is why you get an error message, when trying to access your local Pictures Library.

So as first step you have to allow access to your Pictures Library. To do this you just have to double-click on the “Package.appxmanifest” file in the Solution Explorer. Then go to the Capabilities section and enable the checkbox “Pictures Library”. Save your modifications and there should not be any error message anymore, when you execute your application.


In the next step, add a new class ImageItem to the solution and implement the following code :


This class will be instantiated for each picture in your local Pictures Library. It contains the picture itself, the picture name and a short description.

Add a GridView to the “MainPage.xaml” file, that is going to be used for displaying the pictures from the local Pictures Library :


Here is an example implementation of the whole code that could be implemented for the Image Viewer application in the “MainPage.xaml.cs” file :


When executing the application, you will get a display of all the pictures that are currently stored in your local Pictures Library :


If there are no pictures you will get a message that there were no pictures found :


This concludes this part. I am going to show you how to further configure your applications in more detail, as well as how to publish them in the next parts of the series.