Start with the Documentation
The Desktop Bridge documentation has gotten better and better since the released the first preview. They have lot’s good articles, GitHub samples, snippets and guidance. I’ll try to cover some specifics and tie things together based on my experience. After you’ve brushed up on the documentation the next step is to generate an AppXManifest.xml. The AppXManifest describes the contents and meta data of a UWP AppX package.
Instead of using the Desktop App Converter (DAC), we will convert our app by hand. This way we’ll understand better what’s going on under the hood. Plus, unless your installation is exceedingly complex, doing this manually simplifies your build toolchain. Assuming that this isn’t a one time conversion, and you’ll be adding modern features to you Win32 app, you need to consider how you are going to iteratively build the project.
The DAC runs your installer in a Windows 10 VM, detects the system changes and spits out an AppX package. It looks like it does a really nice job of that but is a 3+ GB package (for the OS based image) and a bit of a black box. Depending on the needs of your deployment, the manual conversion may very well be fine.
Copy the Sample AppXManifest and Edit for Your App
Copy the sample Xml from the manual conversion documentation page in a blank AppXManifest.xml file and add it as a solution item in Visual Studio. Next, fill out all of the placeholders with the specifics of your app. You’ll end up with something that looks like:
<?xml version="1.0" encoding="utf-8"?> <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"> <Identity Name="3652dkackman.FishyFishyFish" ProcessorArchitecture="x86" Publisher="CN=D84FAA85-E110-4951-93B4-A797B4808678" Version="22.214.171.124" /> <Properties> <DisplayName>Fishy Fishy Fish</DisplayName> <PublisherDisplayName>dkackman</PublisherDisplayName> <Description>Some fish. Swimming around on your screen.</Description> <Logo>StoreLogo.png</Logo> </Properties> <Resources> <Resource Language="en-us" /> </Resources> <Dependencies> <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14316.0" MaxVersionTested="10.0.14352.0" /> </Dependencies> <Capabilities> <Capability Name="internetClient" /> <rescap:Capability Name="runFullTrust"/> </Capabilities> <Applications> <Application Id="FishyFishyFish" Executable="FishyFish.exe" EntryPoint="Windows.FullTrustApplication"> <uap:VisualElements BackgroundColor="transparent" DisplayName="Fishy Fishy Fish" Square150x150Logo="Square150x150Logo.png" Square44x44Logo="Square44x44Logo.png" Description="Some fish. Swimming around on your screen." /> </Application> </Applications> </Package>
You’ll get real values for the
Publisher attributes of the
Identity when you reserve the app name online. In the meantime, placeholder values of your choosing are fine. You will need to provide the 150 and 44 pixel logo images. as these are required assets. If you create a blank Universal app in visual studio you can hijack those png’s and make something better later on.
And finally, any place you see
REALTIVE PATH referenced in the sample xml, it is a path relative to the root of your AppX package. An AppX file is just a Zip file and since Zip’s can have folder structure, make all those paths relative to the Zip/AppX file root. My app deploy is simple enough that I just have everything in the root but you might have an assets folder or the like to better organize your packages files.
So that’s the AppXManifest. Next we’ll turn it into an AppX package.