question

brainbro avatar image
0 Votes"
brainbro asked ·

XF.iOS the image set "imagesetname" has 8 unassigned children

I am building a Xamarin Forms app for ios, android and windows.

when adding a new image to ios project I was previously (an earlier version of Xamarin Forms or maybe an earlier version of Visual Studio) able to use Visual Studio Community for Mac on my mac-mini and
- add a new image set
- add a .png image only to the "universal - 1x" and it would compile and run just fine.

Now, (I don't know what changed exactly) when I do this I get a compile warning "The image set '[imagesetname]' has 8 unassigned children.

Apperently the content.json format changed. And visual studio only seems to auto-update this for new or changed imagesets.

Probably visual studio wants me to add another 8 images, but which ones i'm not sure.
I can't find what the "minimal" set is.

I wanted to do the minimal amount of work (resizing to all those resolutions is a bitch) so I saved my .png image to a .pdf with photoshop.
I read that the build will take care of generating the different image sizes.
Then i added the .pdf image to all the "vector" fields in the asset manager.
so "Universal - vector", " iphone - vector" ... etc

What is strange is that when I rebuild my ios solution it still keeps saying it has 8 unassigned children.

I also tried to check the "resizing" checkbox in the top.. no luck

Other things i tried:
- fill all the image size slots with the same png -> still says 8 unassigned children
- create a new asset catalog (.xcassets file) and add a new resource there => same situation


dotnet-xamarinforms
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.

1 Answer

ColeXia-MSFT avatar image
0 Votes"
ColeXia-MSFT answered ·

Hello,

Welcome to Microsoft Q&A!

The warning is caused because some image caches remains in assets ,check the following screen shot

73546-ca444pture.png


Possible solution


  • Delete the image group

73611-captu2re.png

  • Create a new image group

  • Just set Device-Universal as true in properties menu.

73573-capture.png

  • Fill all the image size(1x,2x,3x) slots with the same png




If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




ca444pture.png (28.3 KiB)
captu2re.png (3.8 KiB)
capture.png (51.6 KiB)
·
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.