Windows 10 WinRT API Pack makes calling Windows 10 APIs easier
Microsoft has announced the preview of Windows 10 WinRT API pack via NuGet. The preview is available in the form of NuGet packages which makes it easy to add new Windows functionality to WPF applications. The list includes Geolocation, Windows AI, Machine Learning, etc.
Those who are wondering what NuGet is, then its the package management system for the .NET platform. You can also call it as a free and open-source package manager designed for the Microsoft development platform. It makes it easy to add, update and remove external libraries in package. Developers with a code to share create packages and publish them to a public or private host.
Windows 10 WinRT API Pack
Microsoft has made this package available for every Windows Release. So if you are targeting a particular version, make sure to use the right library. The support is available for Windows 10 version 1803, 1809 and 1903.
These packs make things straightforward for developers. Before this, to access Windows API from WPF or Winforms App, developers needed to add contract files and other reference assemblies to your project. With this release, you can add a NuGet package, and we will do the heavy lifting to add the contracts.These libraries will be a lot easier to update as well.
To add the WinRT API Pack, first, open the NuGet Package Manager Console. Then install the package that includes the Windows 10 Contracts you want to target. If you are targeting earlier platforms, consider only offering functionality available on the detected platform version.
The Windows 10 WinRT API Pack enables you to add the latest Windows Runtime APIs support to your .NET Framework 4.5+ and .NET Core 3.0+ libraries and apps.
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. He enjoys following and reporting Microsoft news and developments in the world of Personal Computing & Social Media.