windowswindows-store-appswindows-storemakeappx

APPX creation for Microsoft Store fails to find assets


I use the latest makeappx to create an APPX container for the Microsoft Store. I added all necessary files but I am wondering why makeappx complains about this:

MakeAppx : error: Manifest validation error: Line 37, Column 134,
Reason: The file name "assets\StoreLogo.png" declared for element "*
[local-name()='Applications']/*[local-name()='Application']/*[local-
name()='VisualElements']/*[local-name()='DefaultTile']" doesn't exist
in the package.

Indeed, there is no such file but that's what Visual Studio gave me. Instead I got files like StoreLogo.scale-100.png, App_Logo.scale-400.png, etc.

Does anyone know why the generation fails?

P.S. I opened the container of an installed store app to check how they do it. There it's exactly the same (let's call them Spoti). They don't have the StoreLogo.png file in the assets but a StoreLogo.scale-100.png, etc.

Any ideas?


Solution

  • Explanation for Assets folder:You unzip an UWP app that's already packaged or create a UWP in Visual studio,you'll find that your app has a folder called Assets under it. Under this Assets folder, there are various sizes of images, which are prepared for the logo and icon used by your UWP app in the store and different devices.

    For example, there are 7 default images for a new UWP app created by Visual Studio. If you want to publish the UWP app to the Store, these 7 images must be replaced with the same size and format images. Visual Studio provides UWP Visual Assets Generator, which automatically generate the images for you.(one thing you should note is that some VS cannot successfully generate all the pictures you may need, so you need to check after it completes the generation). The generation process is shown in the following figure:

    enter image description here

    Copy the generated Assets folder into the app file you are going to package, and then package again. Here is the command which I successful packaged the app before:

    makeappx pack-d "C:\Users\ source\ FolderA\App "-p "C:\Users\ source\FolderB\ App\test\ mypackage.appx"