When updating images in an Asset Catalog for a Xamarin Forms iOS app, I sometime end up with extra images showing in the image set and sometimes the correct images are not assigned to the correct @1x, @2x etc. I also get this sometimes when I attempt to merge changes to my images between to versions of my project. I have been unable to clean out these images and there is no option to un-assign when you right click on these images in the asset catalog. Even deleting image set from the asset catalog via the Visual Studio IDE did not seem to work correctly as I then started getting some compile time errors that image files could not be found in the Assets.xcasstes folder. Any ideas how to correctly merge / handle this type of situation? I would prefer not to manually re-update the images in the second versiomn (i.e. branch) of my project.
So for some reason, I cannot get the XML code I posted above to actually display so I am going to try to post it here.
<ImageAsset Include="Assets.xcassets\config.imageset\config.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\config.imageset\config@2x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\config.imageset\config@3x.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\config.imageset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\Images.imageset\qrbuttonlight32.png">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\Images.imageset\qrbuttonlight64.png">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\Images.imageset\qrbuttonlight96.png">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
You need to make sure you delete the complete XML tag - in this case it would be the entire ImageAsset XML node for each file in the config imageset.