App manifest references the image which does not have a candidate in the main package error in windows phone 8.1

Ghazanfar Khan picture Ghazanfar Khan · Aug 13, 2014 · Viewed 12.2k times · Source

I am just creating app package and got the following error enter image description here

Need help how to resolve this.

Answer

Ohad Schneider picture Ohad Schneider · Oct 8, 2015

In my case it had to do with the default app scale, as outlined in this blog post:

It appears that the default scale has changed [from 100%] to 200%. OK. Fine. And? Why does that matter?

It matters because the main app package contains resources for whatever the default scale is. And for UWP, the default is 200. Since I use app bundles, my Logo-100.png ended up in a satellite app package, and the main package does not have any logo (since I didn't provide the default 200). Hence, my app would not be installable on a system that requires scale-200.

When I renamed the file to Logo.png, the editor complained because it assumed that images without qualifiers were in the default scale (200), and my logo didn't have the correct dimensions for that scale.

There is an explanation for this in the , but it is a little buried:

"The default asset scale for Universal Windows apps is 200. If your project includes assets not scaled at 200, you will need to add a <UapDefaultAssetScale> element with the value of the scale of your assets to this PropertyGroup. Learn more about assets and scales."

So what you need to do is either change your images to the correct scale and rename their suffix accordingly (e.g. scale-200), or change the default scale by opening the .csproj file in a text editor and following the instructions in the porting article linked in said blog post:

Find the <PropertyGroup> element that contains the <TargetPlatformVersion> element. Do the following steps for this <PropertyGroup> element

The default asset scale for Universal Windows apps is 200. If your project includes assets not scaled at 200, you will need to add a element with the value of the scale of your assets to this PropertyGroup. Learn more about assets and scales. Now your element should look similar to this example:

<PropertyGroup>
    …
     <TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
    …
     <UapDefaultAssetScale>100</UapDefaultAssetScale>
    …
</PropertyGroup>