Announcing “UWPDesktop” NuGet Package Version 14393

Windows

Windows
The UWPDesktop NuGet package is here to improve the developer experience with Visual Studio when walking along the
Please, Log in or Register to view URLs content!
.

The Desktop Bridge allows you to call UWP APIs directly from your WinForms, WPF or VB application. You can use APIs such as Live tiles, notifications, App Services and
Please, Log in or Register to view URLs content!


Previously, calling UWP APIs from a converted app was a confusing process. You had to find and reference the right .dll or .winmd, and it often wasn’t obvious which one to choose.

For example, to use “await” on UWP types, you had to reference the System.Runtime.WindowsRuntime.dll (c:program Files (x86)Reference AssembliesMicrosoftFramework.NETCorev4.5
System.Runtime.WindowsRuntime.dll), which was actually from Windows 8.1 and therefore only worked in conjunction with “facadewindows.winmd” (c:program Files (x86)Windows Kits10UnionMetadataFacadeWindows.WinMD).



AppServiceConnectionStatus status = await connection.OpenAsync();



Confusing, right? The new way is much simpler – just include the
Please, Log in or Register to view URLs content!
package to your project, and you’re ready to call any
Please, Log in or Register to view URLs content!
without needing additional references.

You have two options for installing the package:

  1. In Visual Studio, right-click on your project, select “Manage NuGet Packages,” and search for and install the UWPDesktop package (as shown in the screenshot below):
    Please, Log in or Register to view URLs content!
    Please, Log in or Register to view URLs content!

    Please, Log in or Register to view URLs content!
  2. Use the
    Please, Log in or Register to view URLs content!



Install-Package UwpDesktop


Warnings for unsupported UWP APIs


Not all modern APIs can be called directly from your desktop application; for example, you still can’t use XAML or SecondaryTile in your WinForms app. The UWPDesktop NuGet package makes your life easier by raising a warning if you try and call an unsupported API.

Please, Log in or Register to view URLs content!


For more information and to learn more about the UWPDesktop NuGet package and Desktop Bridge, check out the resources below.

Resources


Please, Log in or Register to view URLs content!
 

Users who are viewing this thread

Top