DualApi Finder or listing winRT types usable by Desktop Apps

Download DualApiFinder

In a previous post, I explained how to use the WinRT API in Desktop applications with Visual Studio 2012 Release Candidate. I will soon provide an update for Visual Studio 2012 and 2013 on http://blogs.msdn.com/b/mspfe.

Meanwhile, you should start taking a look at the WinRT types that are usable by Desktop applications. For a given type, the MSDN documentation provides the list of supported platforms in the Requirements section at the end of its corresponding page

PlatformRequirementInMSDN
In the given screenshot, the type is usable both from Windows Store and Desktop applications.

In order to help you, I’ve built a tool that directly lists the types recognized as usable by a Desktop App

DualApi Finder Tool

There is no magic here: these types are decorated by an instance of DualApiPartitionAttribute. As the MSDN documentation states, it indicates that the type is supported in desktop apps and in Windows Store apps.

This is an approximation of the types we are interested in because some WinRT types are only available to Desktop Apps such as PackageManager used in my previous post. And in that case, it is not decorated by a DualApiPartitionAttribute. However, I’ve not found any other Destop-only type other than the types related to PackageManager such as PackageUserInformation or DeploymentResult.

I hope this helps

References

This entry was posted in .NET, C#, Desktop, Store App, Windows 8, Windows 8.1, WinRT and tagged , , , , , , . Bookmark the permalink.