Ghazanfar Khan
Ghazanfar Khan

Reputation: 3718

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

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

Need help how to resolve this.

Upvotes: 28

Views: 13724

Answers (9)

RickJansen
RickJansen

Reputation: 1713

Visual Studio 2022 (for a desktop app): added all images the required sizes, and still got this message. Solved it by first generating all images from a base image, using the "Generate" button. Then replaced the (awful and mis-scaled) results with my own versions. Then it worked. Apparently the form that allows you to add the images is not complete, or has a mismatch with what is actually required. First using the generate option circumvents trouble.

Upvotes: 0

mdimai666
mdimai666

Reputation: 787

For everyone.

  1. From unity remove all windows icons (PLayer settings/Windows/Icons). [important] Will problem
  2. In Unity. Add Splash screens for windows [important]
  3. In Visual Studio - generate manifest all images from standard tool. [important] If you already have "Assets" folder - remove; And generate.

It only works like this.

Upvotes: 1

Ishan Madhusanka
Ishan Madhusanka

Reputation: 791

The default size is Scale 200. If you didn't include that image, Visual Studio notifies you of this. So include an image asset for Scale 200

Upvotes: 5

Cru Dy
Cru Dy

Reputation: 51

I solved the problem by changing the name of the logo in the AppManifest.

For example, if you had the error on the Store Logo in the Appmanifest ==> Store Logo ==> Store Logo : Assets/Store-Logo

Change it to Assets/Store-Logoooo

then also change Store Images in the main app.

Upvotes: 1

Avikalp Srivastava
Avikalp Srivastava

Reputation: 139

In some case the solution of renaming the images in the assets folder doesn't work out.

In that case, you should set the "Generate App Bundle" option at "Never" and continue normally with the rest of the packaging procedure.

Though this is not a permanent solution, it is a good work-around and is pretty useful if you don't necessarily want App bundles for reducing size.

Sources : Personal experience of solving this error and searching the solution on-line and finding that it worked for other users as well : https://social.msdn.microsoft.com/Forums/en-US/3857fb9d-dbd5-4eb8-aa75-fe4c47f26875/wp81-universal-error-image-does-not-have-a-candidate-in-main-app-package-while-creating-a-package?forum=WindowsPhonePreviewSDK

Upvotes: 0

user2125311
user2125311

Reputation: 67

I was able to solve this by ending the laziness. Delete all the images that you had setup, START COMPLETELY OVER, re-assign ALL images - all 3 images for each row- set them all. That's the only way you'll know for sure that you're good to go.

Upvotes: 1

Ohad Schneider
Ohad Schneider

Reputation: 38112

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>

Upvotes: 40

ksilcox
ksilcox

Reputation: 61

I resolved this by making sure I had separate image files for all scale sizes. (ie. .scale-100, .scale-140, .scale-240)

Upvotes: 6

user3090763
user3090763

Reputation: 1099

I resolved it by removing .scale-100 for your Logos name.This works for me.

Upvotes: 22

Related Questions