uwp-desktop icon indicating copy to clipboard operation
uwp-desktop copied to clipboard

Windows.System.Launcher shows warning that can only be used in UWP apps

Open peternoyes opened this issue 7 years ago • 2 comments

I am using Windows.System.Launcher.LaunchUriAsync from a C# Windows Forms Desktop application, and the function works.

However, I see a warning that "Type 'Windows.System.Launcher' can only be used in UWP apps, not Desktop or Centennial.

Is this warning benign? Is it only going to work on my development machine?

peternoyes avatar Feb 13 '17 19:02 peternoyes

For an example snippet, this line of code generates the warning but works as expected.

await Task.Run(() =>
    Launcher.LaunchUriAsync(new System.Uri($"ms-windows-store:review?pfn={Package.Current.Id.FamilyName}")));

dkackman avatar Feb 20 '17 14:02 dkackman

Same concern here with this line:

Await Launcher.QueryUriSupportAsync(dummyUri, LaunchQuerySupportType.Uri, packageName)

bvillersjr avatar Jun 13 '18 10:06 bvillersjr