Bug 17061 - Asset Catalog support is not implemented for iOS for VS
Summary: Asset Catalog support is not implemented for iOS for VS
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.8.x
Hardware: PC Windows
: Normal enhancement
Target Milestone: ---
Assignee: vsx
: 15407 17332 ()
Depends on:
Reported: 2014-01-05 14:14 UTC by Andy
Modified: 2016-03-09 08:57 UTC (History)
18 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andy 2014-01-05 14:14:17 UTC
I tried to set to use xcassets from XS for one project. Then went back to VS, rebuilt, but apparently it doesn't work, icons and splashscreens are empty. Opening info.plist in VS, shows me the old resource icons and splashscreens (empty now). 

In brief, I can't seem to be able to use xcassets and VS together. Actually I'm confused, since for a different project, I managed to use them in XS, then move to VS without problems. This time I created the project on VS, and can't do it.

If you want to repro, just create a blank project in VS
Comment 1 Andy 2014-01-05 14:49:58 UTC
Let me detail it:

- create project in VS on PC hd. Close it
- go to XS on Mac and open same project. 
- Setup XCassets resources. Build, deploy, everything is ok
- Close project. GO back to PC/VS. 
- Deploy -> no icons. Clean, rebuild, deploy -> no icons. 

and if you open info.plist in VS there's no xcassets section
Comment 2 Mohit Kheterpal 2014-01-07 07:26:36 UTC
We are try to reproduce this issue via steps mentioned in comment 1. But we are not able to reproduce this issue.

We have followed following steps :
1. Create sample application in VS
2. go to XS on Mac and open same project. 
3. Open info.plist and use Asset catalog
4. Add icons
5. Close project. GO back to PC/VS.
6. Debug/Run Application in VS via MTVS

Observed that : We are getting app launch icon on simulator on mac

Could you please correct our steps? If we have followed wrong steps to reproduce this issue. 

Or Please attached sample application so that we can reproduce this issue at our end.   
Screencast 1: http://screencast.com/t/ogqwRf2dao
Screencast 2: http://www.screencast.com/t/BGU3bVkbtS1
Comment 4 Andy 2014-01-07 07:47:41 UTC
The screencast seems incomplete.

Instead of opening info.plist at 3), I double clicked on the project file.

I set all icons just once, later, I only set the icons for ios 7 and launched accordingly on the simulator
Comment 5 PJ 2014-01-08 13:33:17 UTC
I want to just add here that Asset Catalog support in VS is not currently implemented, but will be in a future update.

If you manage to get it working by creating the asset catalog on the Mac and then building on Windows that could be a workaround but it's not a tested or supported scenario with the currently released builds.

I'm not sure why Mohit is still seeing the icons when you can't (and perhaps he can help you get the workaround going), but you'll most likely need to use the old-style icons for the time being if you're sharing the project between VS and XS.
Comment 6 Andy 2014-01-08 13:41:16 UTC
I can't use the old style icons because of another bug in XS that mixes up them between ios 6 and ios 7

So what should I do ?

I don't understand the workaround...what workaround ?
Comment 7 Dominique Louis 2014-01-21 05:10:27 UTC
*** Bug 17332 has been marked as a duplicate of this bug. ***
Comment 8 Jose Miguel Torres 2014-07-31 05:55:27 UTC
*** Bug 15407 has been marked as a duplicate of this bug. ***
Comment 9 Timothy Lee Russell 2015-06-04 23:21:46 UTC
With thie bug and only using Visual Studio, this makes it not possible to add icons to a watch app, it seems.
Comment 10 Aaron Sky 2015-06-05 11:38:30 UTC
Xamarin for Visual Studio should support asset catalogs and Watch icons. What version are you using? Could you update this bug with the environment information from Help > About Microsoft Visual Studio?
Comment 11 Timothy Lee Russell 2015-06-05 22:13:18 UTC
Microsoft Visual Studio Premium 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51650

Installed Version: Premium

LightSwitch for Visual Studio 2013   06191-004-0456024-02172
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06191-004-0456024-02172
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06191-004-0456024-02172
Microsoft Visual Basic 2013

Visual C# 2013   06191-004-0456024-02172
Microsoft Visual C# 2013

Visual C++ 2013   06191-004-0456024-02172
Microsoft Visual C++ 2013

Visual F# 2013   06191-004-0456024-02172
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06191-004-0456024-02172
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06191-004-0456024-02172
Windows Phone SDK 8.0 - ENU

ASP.NET and Web Tools   12.4.60425.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Web Apps
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.4
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

LLBLGen Pro Designer   4.0
The LLBLGen Pro designer integrated inside Visual Studio.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone

Microsoft Azure HDInsight HQL Service   2.0.1000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.1000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.4
Microsoft Azure Tools for Microsoft Visual Studio 2013 - v2.4.20730.1601

Microsoft Azure Tools   2.5
Microsoft Azure Tools for Microsoft Visual Studio 2013 - v2.5.21104.1601

Microsoft Azure Tools   2.6
Microsoft Azure Tools for Microsoft Visual Studio 2013 - v2.6.30423.1601

NuGet Package Manager   2.8.60318.734
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Release Management for Visual Studio Package   1.0
Release Management for Visual Studio

SourceGear Vault Professional Visual Studio Enhanced Client
SourceGear Vault Professional Visual Studio Enhanced Client

SourceGear Vault Professional Visual Studio Work Item Client
SourceGear Vault Professional Visual Studio Work Item Client

SQL Server Data Tools   12.0.41025.0
Microsoft SQL Server Data Tools

Telerik ASP.NET AJAX VSExtensions   2015.2.317.0
Telerik UI for ASP.NET AJAX VSExtensions

Telerik WPF VSExtensions   2015.2.317.0
Telerik UI for WPF VSExtensions

VSCommands for Visual Studio 2013   12.0
VSCommands for Visual Studio 2013

Web Essentials 2013   2.5.3
Adds many useful features to Visual Studio for web developers.

Windows Azure Tools   2.3
Windows Azure Tools for Microsoft Visual Studio 2013 - v2.3.20320.1602

Windows Azure Tools   2.2
Windows Azure Tools for Microsoft Visual Studio 2013 - v2.2.11003.1601

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.11.590.0 (5160db7)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (d419c934e6ce2113653ff4c40214e3a5d5a69440)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS (fce006eae308515fc1eaf85fcc0f90699d9c7e8b)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration
Comment 12 Matthew Orlando 2015-10-30 12:20:29 UTC
Visual Studio definitely does not support Asset Catalogs the way it should. It allows me to make all the asset catalogs I want, but it will only let me add LaunchImage or AppIcons to them. It does not work at all for arbitrary images.

I had great frustration trying to follow the documentation here: https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/displaying-an-image/#Adding_Images_to_a_Asset_Catalog_Image_Set only to realize that this is only supported in Xamarin studio.
Comment 13 Sascha Schwegelbauer 2015-11-18 04:05:03 UTC
Same problem here - cannot use AssetCatalogs from Xamarin.iOS for Visual Studio. :(

Using VS2015 Enterprise and Xamarin.iOS
Comment 14 Jose Gallardo 2015-12-21 21:08:09 UTC

We added support for Image Sets as part of some Asset Catalogs changes included on latest Alpha builds.
Can you please try those bits (XVS and see if that helps?

Our Assets Catalog support doesn't follow exactly the same flow XS's one does, but it should be on par feature-wise.

One missing piece yet is a documentation update. We'll try to get the docs updated accordingly soon.

Please let me know if that doesn't resolve the issue.

Comment 15 Timothy Lee Russell 2016-01-01 04:15:10 UTC
It showed initial signs of working but then...

I can add an Asset Catalog now in VS. I can create one called Media and it brings up AppIcons and LaunchImages. I can click the ellipse and add icons but when I click save, it will not save.

If I click "save all", it says: "The method or operation is not implemented"

If I click "save", it says: "Could not find file: 'D:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Media'.

I am on:

VS 2015 - 14.0.24720.00 Update 1
Comment 16 Jose Gallardo 2016-01-05 13:25:07 UTC
Hi Timothy,

We tried to reproduce the issue you're describing with the same version, but we couldn't. It can be related to an already existent Assets Catalog in the project causing an unexpected behavior.

Do you get the same behavior with a new project (from scratch)?

If you do, can you please share us the logs? (Help-Xamarin-Zip Logs).

If you don't, can you please share us the .xcassets folders on the failing project? If it's big maybe the structure can help enough. We might also need the .csproj file. Ideally, if you can share us a small project using the same catalog causing the same issue, that would be incredibly helpful.

Thanks for the information!
Comment 17 Timothy Lee Russell 2016-01-06 04:06:03 UTC

I tried deleting the assets catalog folder and whatever else I could find but it did the same thing so I created an minimal solution and the same thing happens there as well.

I don't want to post it here though. I'll share a link to it through the business support email.

Comment 21 Leo Olivers 2016-02-07 13:14:20 UTC
As of today, iOS asset catalogs still do not work in visual studio!

Have configured an asset catalog for icons/launch images in Xamarin Studio on OS/X.  When building on a mac the asset catalog is used correctly used on the iOS device.  However, when building the *exact same* solution in VS2015 the asset catalog is just ignored. What gives?

the worst part of this is that the app also shows a different layout when compiled from VS: there are black bars at the top/bottom of the screen and layout seems to mimic iphone 4 screen dimensions on iphone 5/6 simulator

This is *extremely frustrating* and blocks development in Visual Studio.

Please do keep in mind that significant extra costs for the Xamarin Business plan are paid only for the sole reason of being able to develop in Visual Studio. So please make functionality that is available and working properly in the cheaper option also available in the more expensive business plan

Xamarin stable 5.10.2
VS 2015 update 1
Comment 22 Timothy Lee Russell 2016-02-09 05:10:46 UTC
I created and shared a repro project with support but haven't heard back about it. Maybe Xamarin could change the Status back to not resolved and it would float a light higher in the bug tracker?

Comment 23 Zahi Kramer 2016-02-17 11:17:38 UTC
same here for me.
Still bug NOT FIXED.
Comment 24 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-08 23:21:16 UTC
## For the _specific_ issue from Comment 15

> If I click "save all", it says: "The method or operation is not
> implemented"
> If I click "save", it says: "Could not find file: 'D:\Program
> Files\Microsoft Visual Studio 14.0\Common7\IDE\Media'.

## My results

Unfortunately I was not able to replicate this problem locally using the provided non-public test case ("TestOfAssetCatalogs").

Versions tested:

GOOD: XamarinVS (c7ebc0f) + VS 2015 Update 1
GOOD: XamarinVS (7082690) + VS 2015 Update 1

I was able to add an asset using the "..." button and then save the asset catalog successfully using either the "Save" or "Save All" button. I tried multiple different scenarios to attempt to hit the problem, including using a new image that I created from scratch vs. using the images included in the test case.

## Next steps for that _specific_ problem

If you are still able to replicate this issue with the latest versions, please send a new email to "Business & Enterprise Support" [1] for further one-on-one troubleshooting to determine what is unique about your environment. Thanks in advance!

[1] https://xamarin.com/support
Comment 25 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-08 23:26:15 UTC
## I am marking this _old_ bug report as "CLOSED"

This bug report is quite old. It was originally filed before XamarinVS had _any_ support for editing asset catalogs. (XamarinVS.iOS 1.10 was the latest version on 2014-01-05. The XamarinVS asset catalog editor was not added until 2015 in XamarinVS 3.9 [1].) Since XamarinVS now does provide at least _some_ support for asset catalogs, and since that support works as expected in at least _some_ scenarios [2], I would _strongly_ recommend that any further discussion of _specific_ problems using asset catalogs in Visual Studio be directed onto _new_ individual bug reports.

[1] https://developer.xamarin.com/releases/vs/xamarin.vs_3/xamarin.vs_3.9/#Other_new_features

[2] See for example https://www.youtube.com/watch?v=KZbrLwJwGeE
(Originally posted here: http://forums.xamarin.com/discussion/comment/178845/#Comment_178845)

## Remaining bugs in the original workflow from Comment 1: Bug 36817

If we look at the steps to replicate from Comment 1, we can see that they involve moving a project back and forth between Xamarin Studio and Visual Studio. That specific workflow is currently _broken_ due to Bug 36817.

As described in Bug 36817, Visual Studio incorrectly uses `/` path separators instead of `\` path separators for `<ImageAsset>` elements. Xamarin Studio correctly uses `\` path separators. Possible workarounds: create your asset catalogs directly in Visual Studio, or manually switch the direction of the path separators when moving between Xamarin Studio and Visual Studio.

## Other bugs related to asset catalogs that exist in the current Stable channel versions

Bug 38427 - The Asset Catalog entry is not displayed in the Solution Explorer when the Visual Studio UI is set to a language other than English

Bug 36713 - The Asset Catalog editor in VS does not include launch image sizes for newer iPhone models

Bug 39137 - [Regression in Xamarin.iOS] Changes in the `Info.plist` or in asset catalogs are ignored until the project is cleaned and rebuilt

Bug 38008 - Asset catalog `.plist` and image files are marked with `<InProject>false</InProject>` in the `.csproj` file. This causes VS source control to treat them as "Untracked Files" by default. The files must therefore be added to source control explicitly, unlike normal bundle resources.

See also the following Bugzilla query that includes a few other unresolved bugs related to asset catalogs in VS:

## Additional bug reports encouraged for other problems

If any customer has another set of steps to replicate a problem with asset catalogs that is not yet covered by any of the existing bugs, please do file a new bug report [2] so that those steps can be investigated. Be sure to include the "actual" and "expected" results as well as your Xamarin version information. Thanks in advance!

[2] https://bugzilla.xamarin.com/newbug

Xamarin Customer Support
Comment 26 Timothy Lee Russell 2016-03-09 04:30:43 UTC
All right, it doesn't work for me on + VS 2015 Update 1.

I guess I will file a new bug report.