In this answer I was told that I need a packaging project to add a desktop exe to a UWP app (to be used through desktop extensions).
However, the packaging project is very lightweight, there's not much there. So I was wondering if I can insert whatever is the pertinent code from the packaging project into the UWP app (and do without the packaging project) instead of migrating all of the UWP stuff into the packaging project. This will also make everything simpler and therefore less prone to errors, now and in the future.
I tried once. I added the extra TargetDeviceFamily
. It got accepted by the store, only to be told later that errors were found. (The app crashes on launch.)
If you want to do this manually, it can be done. In your specific case (as far as I understand it from the other thread) you would only need to add this to the Package.appxmanifest:
<build:Metadata>
<build:Item Name="Microsoft.Build.DesktopBridge.Tasks.dll" Version="4.6.27406.0" />
</build:Metadata>
This way the Store will assume it has been packaged correctly with desktop binaries in sub folders, and UWP binaries in the root - so they can be processes for .NET native compilation.
However, for future sustainability I would recommend using the packaging project for creating the Store upload packages.