Jun 092014
 June 9, 2014  Posted by at 3:06 pm C# & F#, Universal Apps, Windows, WinRT  Add comments

Brokered components were introduced at BUILD 2014 and allows us to make use of legacy DLLs without much problems (heh). The VS templates came out aprox a month after BUILD, and before that there was a fair deal of manual work involved, I tried it and it was a pain. However, the templates make it rather easy, or easier.

Here is a step by step video with some rambling, which is what you get when your record demos at midnight after a week with very little sleep.

The best example I could come to think of, and I don’t even know if this is the best example, is simply using the file watcher and output changes to a directory in the Windows Store App.

The way it works is that the brokered component allows us to use any DLL (more or less), which means that the Store app won’t be able to use it directly as there is a missmatch between the platforms they are built for.

This is solved by creating a proxy that in turn can reference the component and allow the Store application to call the component.

The Store application has to add an extension in the manifest and register the proxy DLL as well as classes that it will be using, and the DLL has to be registered.


Install VS extension


Create Store app

<No image you should know how to do this>

Create  Brokered Component – do magic in it


Create Proxy – add reference to component (right click, properties, common properties, add reference)




Add reference to proxy from Store app


Build solution

Add Extension in Store manifest file, register class and add path to Proxy DLL


Run regsvr32 from elevated prompt and path to proxy DLL


Run and have fun.


Some more links:

Brokered components in detail


VS extension




BUILD video demo


Detailed step by step by awesome Harry


Harry Pierson on Twitter









  2 Responses to “Creating and using brokered components step by step video”

  1. Hey,

    (Maybe a stupid question) I might just be confusing the name WinRT to ARM devices instead of the actual “runtime”. Does this only apply to WinRT (ARM) devices or can I use the same thing with writing x64 Windows Store Apps?


  2. Hi Iris , I try to build a component Brokered and read all the references you posted , but I can not make it work , I always get the following errors:

    * Class unregistered

    *An exception of type ‘System.TypeLoadException’ occurred in ClientRT.exe but was not handled in user code

    BTW, hardly knew you, but you’re amazing Xb, I currently work with a Microsoft partner and looked very far being MVP, but you have inspired me even more.

    Thank you .
    Greetings !!

Leave a Reply to Adalid Cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



What is 3 + 10 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)