Monthly Archives: April 2014

Using WinRT from Winforms

It is beyond doubt that WinRT simplifies the development of our Apps, specially when we’ve to access devices like webcams or gyroscopes. But, is it possible to use these new APIs from our good old friend Winforms or are they restricted to Windows Store Apps?

I don’t know why Visual Studio does not allow you to use them out of the box, but don’t worry cause the procedure to enable that feature is quite simple. Just follow these steps:

  1. Open your .csproj file with your favorite text editor
  2. Add the following element as a child of the Project element:

That’s it! Now you can open the project with Visual Studio and you’ll be able to add a reference to WinRT: