0

Our WPF application uses the Windows 10 SDK for the listing UWP packages installed.

We used UwpDesktop up until recently when we saw that it is no longer being developed (the developer left Microsoft) and decided to remove an extra dependency from our project. We started looking for documentation on bridging and found a lot of contradictory information.

Official examples from Microsoft seem to reference UnionMetadata\Windows.winmd(further on - "fat", around 5 mb) directly, except when sometimes they don't and actually reference UnionMetadata\Facade\Windows.winmd (further on - "facaded"). And then again the latest materials I have found on the issue tell me to use the "facaded" version.

I have decompiled both the "facaded" and "fat" version of Windows.winmd and it seems that the facade version is literally just a bunch of using statements with type references for the API. The "fat" version actually contains extern declarations of the API.

I have referenced both versions (not the decompiled ones) on different branches, they both work, compile, and call the expected APIs. Using the "fat" version seems more convenient as you only need to import it and a runtime dll, while importing the "facaded" version requires you to manually also import other SDK version-relative files.

My questions are:

  • what is the difference?
  • what should be used and why?
  • what are the drawbacks of importing UnionMetadata\<sdk_version>\Windows.winmd directly?
boromak
  • 351
  • 3
  • 11
  • [manually add the references to the solution](https://blogs.windows.com/buildingapps/2017/01/25/calling-windows-10-apis-desktop-application/) – magicandre1981 Dec 28 '17 at 06:52
  • I may have explained myself incorrectly. I referenced both versions: the "facade" winmd from and SDK and the one at root separately and both approaches work. The link you provided (dated January 2017) recommends using the "fat" version at the root, while [the bridging guide](https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-enhance#first-set-up-your-project) (December 2017) recommends using the facade. I know how to make it work. I want to know which approach is preferable over the other and why. – boromak Dec 28 '17 at 10:01
  • follow the steps from the newest guide/documentation – magicandre1981 Dec 28 '17 at 14:27

0 Answers0