Using WinRT from usual applications

This recipe shows you how to create a console application that will be able to use the WinRT API.

Getting ready

To go through this recipe, you will need Visual Studio 2015 and the Windows 10 operating system. There are no other prerequisites. The source code for this recipe can be found at BookSamples\Chapter11\Recipe2.

How to do it...

To understand how to use WinRT from usual applications, perform the following steps:

  1. Start Visual Studio 2015. Create a new C# console application project.
  2. Right-click on the created project in Visual Studio Solution Explorer and select the Unload Project… menu option.
  3. Right-click on the unloaded project and select the Edit ProjectName.csproj menu option.
  4. Add the following XML code below ...

Get Multithreading with C# Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.