iOS Asset Catalog being cleared in Visual Studio

AllisterAllister USMember ✭✭

so it looks like this bug is still around.
In Visual Studio 2015 with Xamarin.iOS anything icons I set under Universal Icons get totally ignored/deleted.
I'll add the images, and the images will show up in the iOS Application pane while I'm looking at it, but the plist doesn't update to reflect my changes, and when I save/close the project settings and return then all icons have vanished again.
Makes things quite awkward to say the least.



  • AllisterAllister USMember ✭✭
  • AllisterAllister USMember ✭✭

    so in the end I just migrated my assets to xcassets in xamarin studio on the mac, then copied the changes back to the files on the pc, Visual Studio 2015 isn't deleting the:
    entries in info.plist, so at least I don't have image references being dropped by visual studio anymore, I just can't change/set what images are being used unless I open the project on the mac or edit the json by hand.
    yay :-/

  • JoelAnairJoelAnair USMember ✭✭

    @Allister thanks for posting the key-value pairs from info.plist, saved me the trouble. Sure would be nice if this worked in Visual Studio, eh? Seems like a dumb thing for many of us to have spent troubleshooting. Thanks for the help.

  • JulienRosenJulienRosen CAMember ✭✭✭✭

    In my Info.Plist, I have


    My contents.json has a bunch of images set. But my app still shows no icon on simulator or device. Any ideas?

  • AllisterAllister USMember ✭✭

    @JulienRosen just off the top of my head, depending on versions you're running, when I was running from Visual Studio using iconsets the icons wouldn't show as visual studio wouldn't recognise/use the iconsets, while copying the project to a mac and run it from xamarin studio the icons would show up.
    So bottom line, if you're running from visual studio don't stress about icons missing, but if you run/publish it on the mac and icons are still missing then some investigation may be needed.
    good luck :-)

  • JeffBowdenJeffBowden USMember

    Just struggling with this myself today. It seems if you're doing a deploy of any kind, and you're using XSAppIconAssets (.xcassets), Visual Studio will drop the assets, and your app will not have an icon. Do the same compile in Xamarin Studio on the mac, and the app icon re-appears. Be nice to see this fixed, so I can do ad-hoc deploys from VS without having to copy the whole project over to the mac.

  • john82john82 ITMember ✭✭✭

    This is still live. I don't know how, but after some time, some deploys, .xcassets are now totally ignored by VS 2015.
    When deploying the same source code via XS all is fine.

  • john82john82 ITMember ✭✭✭

    This bug is still alive in VS 20017. It seems that somehow VS decide to remove the asset catalog from the project :(

  • PeterDouglasPeterDouglas USUniversity ✭✭

    @Allister I have my icons back now, thank you! For days I couldn't figure out what had happened to them. My path to Assets was different, so I hand-tailored the plist.

  • DavidHilmerDavidHilmer USMember ✭✭

    This bug is still alive in VS 20017. I am missing more images than just the Icons! :neutral:

  • DaronRiceDaronRice USMember ✭✭
    edited April 2018

    in plist, changed this line <string>Resources/Media.xcassets/AppIcons.appiconset</string> to this

    <string>Media.xcassets/AppIcons.appiconset</string> because media.xcassets was a the root level, not under the Resource folder... now it works.... Thanks for the solution @PeterDouglas

  • @DaronRice said:
    in plist, changed this line <string>Resources/Media.xcassets/AppIcons.appiconset</string> to this

    <string>Media.xcassets/AppIcons.appiconset</string> because media.xcassets was a the root level, not under the Resource folder... now it works.... Thanks for the solution @PeterDouglas

    it works for me... thanks ;)

  • gromovicgromovic Member ✭✭

    Do you have to name the folder "Media"?

  • DavidHilmerDavidHilmer USMember ✭✭

    YES!!! Thanks for the solution @PeterDouglas. That was it!!!
    I do have 1 question, Why doesn't Microsoft/Xamarin care about us? But that is a question for another blog.
    Thanks again @PeterDouglas!

  • BryanBanksBryanBanks USMember

    I had the files in the root folder, but didn't make them part of the project. In my case, I was changing my logo, and couldn't get the new one to appear.

    a) Move the media.xcassets folder to Resources, include it in the project, and change your info.plist to Resources/Media.xcassets/AppIcons.appiconset
    b) leave media.xcassets in the root folder, include it in your project, and change your info.plist to Media.xcassets/AppIcons.appiconset

  • RodSanfordRodSanford USMember

    Well, VS 2019 is back to making changes to the info.plist again...everything was working fine, then randomly, I get a VS error stating that the app could not find the info.plist file. After closing out VS and reloading the project several times, everything seemed fine. But then my next build I got the blank launch image followed by the scrunched screen look, which let me know that the icon and launch assets were dropped again. Did a source control "compare with unmodified" and sure enough, the following lines were deleted from info.plist:


    Can we get this bug fixed?

  • sgousgou DEMember ✭✭

    @RodSanford Have the same issue. Do you reference in your iOS Project another iOS Project from your solution?

Sign In or Register to comment.