我有一个 Windows 服务(使用本教程创建)。
我正在尝试运行IAsyncOperation:
var uri= new Uri(@"uri/to/second/app");
var options = new LauncherOptions
{
TargetApplicationPackageFamilyName = "second-app-guid"
};
var results = await Launcher.LaunchUriForResultsAsync(uri, options);
Run Code Online (Sandbox Code Playgroud)
但是,我从以下错误中得到以下错误await:
The type 'IAsyncOperationWithProgress<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.The type 'IAsyncOperation<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.The ….net windows-services async-await windows-runtime windows-10-desktop