question

JS-3655 avatar image
0 Votes"
JS-3655 asked ·

Image Reference Missing from Package

I am using VS 2019 to develop UWP, C#, XAML game. I am getting many errors like the lines like below while uploading the package in the store.


Image reference "Assets\StoreLogo.png": The image "Assets\StoreLogo.scale-200.png" is missing from the package.




I created those images using Package.AppManifest - > Visual Assets Asset Generator - > Generate to generate. All those images are in the folder pointed in the image error. All those images are set to copy on build. Tried setting different folders (while generating). Tried clearning and rebuilding packages multiple times. The publish process does not show any errors (WACK). I can see images inside the msixupload packages. Any help will be appreciated.

windows-uwp-xaml
· 7
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Are you following these steps to generate your all assets? In addition, please open your .vcxproj file(Right-click your project-> Unload Project->Edit .vcxproj), check the images the file includes with the actual images in the Assets folder to see if they match. Or you can delete all images and using Visual Assets Generator to re-generate them, then upload it again to see if the error still exists.

0 Votes 0 ·

Yes, using the visual tool that you are pointing to. The images match (except for having filename.png vs filename.scale-number.png).

Tried to multiple times and been researching to figure out what's going on. So far, I found that the msixbundle has appname_version_scale-100.msix and appname_version_scale-400.msix, but it does not contain appname_version_scale-200.msix. Most, if not all, the apps are complaining about the missing scale-200 images. I am not sure if the scale-200 images goes somewhere else because they are default ones, or if VS just fails to package the scale-200 versions.

Any help will be appreciated!

Thanks!

0 Votes 0 ·

May I know how did you package your project as the msixbundle? In addition, the appname_version_scale-200.msix file you mentioned is a single package, it is different with the .png. Where did you find the appname_version_scale-100.msix file? Can you show a screenshot where these .msix files are located?

0 Votes 0 ·
Show more comments

1 Answer

JS-3655 avatar image
1 Vote"
JS-3655 answered ·

Finally found a solution:

https://github.com/WhitewaterFoundry/Pengwin/issues/498
https://developercommunity.visualstudio.com/content/problem/417332/uwp-creating-app-packages-for-store-package-does-n.html

Basically, when VS 2019 builds a package, it fails to include some visual assets if the solution is in OneDrive synced folder. I copied the solution folder to desktop (folder not included in OneDrive) and rebuild the solution and it worked.



A couple notes so that if anyone else has the same issue, they will find this thread when searching.

I got warnings like the ones in the post linked post:

GENERATEPROJECTPRIFILE : warning PRI298: 0xdef00535 - File or folder ignored due to file attributes (hidden, system, link): ARM64\Release\PackageUploadLayout\Assets\Square44x44Logo.scale-400.png.

I checked to see if any file or folder had hidden or system attribute, but that was not the case. Plus, there were plenty of images inside the overall package that I did not think these warnings meant anything (had warnings for images that were included in the package).

Hope this helps others as well. One of the posts states this issue started with Visual Studio 2019 and was fine in Visual Studio 2017.

Thanks FayWang to trying to help!

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.