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?
Thanks!
This is likely in a similar location as mine:
C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0\Windows.Foundation.UniversalApiContract#VerNum#\Windows.Foundation.UniversalApiContract.winmd
Wil
You can't remove Windows.Foundation.UniversalApiContract, because is part of Windows SDK and has dependencies. You might update to SDK version 10.0.14393.0 or greater/lower for test you app.
You have the SDK version 10.0.10586.0 where is UniversalApiContract version 2.0.
Windows Universal Platform SDK API contracts
Windows SDK and emulator archive (to download & install)
And you need to switch the target version of your UWP app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With