[UWP] [桌面桥] Windows.Foundation.UniversalApiContract在哪里? [英] [UWP][Desktop Bridge]Where is Windows.Foundation.UniversalApiContract?
问题描述
我正在调用:FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();在我的uwp应用程序中启动win32应用程序。然后我试图打开我的uwp和win32应用程序之间的连接,并从uwp发送消息到win32。我创建
a ValueSet valueSet = new ValueSet();
但是在编译时,它抱怨:错误CS0433'Windows.Foundation.FoundationContract,Version = 2.0.0.0中存在'ValueSet'类型,Culture = neutral,PublicKeyToken = null,ContentType = WindowsRuntime'和'Windows,Version = 255.255.255.255,Culture = neutral,
PublicKeyToken = null,ContentType = WindowsRuntime'
我手动添加引用C:\Program Files(x86)\ Windows Kits \10\UnionMetadata \ Windows.winmd以便能够调用FullTrustProcessLauncher,我相信我想在这个Windows.winmd中使用ValueSet。
我很困惑Windows.Foundation.FoundationContract在哪里,它在我的项目中是怎么回事?我怎么能删除它?
我还删除了bin和obj文件夹,重启visual studio 2015并重建。这没有用。
你好pspsli,
您需要在UWP项目中添加Desktop Extensions SDK才能使用FullTrustProcessLauncher。请参阅官方AppService Bridge示例。
https:// github .com / Microsoft / DesktopBridgeToUWP-Samples / tree / master / Samples / AppServiceBridgeSample
最好的问候,
David
I am calling: FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync(); to launch a win32 application in my uwp application. Then I am trying to open the connection between my uwp and win32 application, and send a message from uwp to win32. I create a ValueSet valueSet = new ValueSet();
But at compile time, it complains: Error CS0433 The type 'ValueSet' exists in both 'Windows.Foundation.FoundationContract, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' and 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'
I do manually add the reference to C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd to be able to call FullTrustProcessLauncher, and I believe I want to use the ValueSet inside this Windows.winmd.
I am confused where is the Windows.Foundation.FoundationContract, how it is in my project? How could I remove it?
I also delete the bin and obj folder, restart visual studio 2015 and rebuild. It doesn't help.
Hi pspsli,
You need to add the Desktop Extensions SDK in the UWP project to use FullTrustProcessLauncher. Please refer to the official AppService Bridge sample.
https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/AppServiceBridgeSample
Best Regards,
David
这篇关于[UWP] [桌面桥] Windows.Foundation.UniversalApiContract在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!