Bug 51672 - Images in resource folder are not available in Image drop down in UIImage properties in XPLat Native PCL solution when Android project is unloaded.
Summary: Images in resource folder are not available in Image drop down in UIImage pro...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 4.2.0 (C8)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Pavel Yakovlev
URL:
Depends on:
Blocks:
 
Reported: 2017-01-20 21:10 UTC by Jon Goldberger [MSFT]
Modified: 2018-03-03 18:23 UTC (History)
9 users (show)

Tags: ac, vs Akvelon
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:
Status:
RESOLVED FIXED

Description Jon Goldberger [MSFT] 2017-01-20 21:10:51 UTC
## Description

If a new Blank App (Native Portable) solution is created and the Android project is unloaded, then when opening the Main.storyboard file in iOS Designer and adding a UIImageView, when you try to select an Image for the UIImageView via the Image drop down in the Properties pane, images in the Resource folder do not show up in the drop down and instead you get a File Explorer window to select an image when you click on the Image drop down list. If you reload the Android project and close and re-open the storyboard file, then the images in the Resource folder are shown in the Image drop down and everything works as expected. It should also be noted that if you delete the ItemGroup for the Image Assets 

> <ItemGroup>
> <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Contents.json">
> ...
> </ItemGroup>

then again everything works as expected even with the Droid project unloaded.

## Steps to reproduce:

1. Create a new project in VS – choose the template "Blank App (Native Portable)"

2. Unload the xxx.Droid project (right click the project file -> unload project) – important

3. Add an image to the Resources folder (right click the Resources folder -> add -> existing item)

4. Open Main.storyboard and drag an Image View on the storyboard

5. Open the Properties pane and click on the Image drop down list to select an image for the image view.

Expected result: The image you added to the Resources folder will be shown in the drop down list, can be selected, and will be rendered on the design surface.

Actual result: A File Explorer window opens for you to select an image. 

6. Now close the storyboard file and reload the Android project.

7. Open the storyboard file and open the Properties pane and click on the Image drop down list to select an image for the image view.

Expected result: The image you added to the Resources folder will be shown in the drop down list, can be selected, and will be rendered on the design surface.

Actual result: As expected.

8. Close the storyboard file

9. Unload the Android project.

10. unload the iOS Project.

11. Edit the iOS .csproj file to remove the entire <ItemGroup> that has the Asset catalog as noted in the description above.

12. Reload the iOS project

13.  Open the storyboard file and open the Properties pane and click on the Image drop down list to select an image for the image view.

Expected result: The image you added to the Resources folder will be shown in the drop down list, can be selected, and will be rendered on the design surface.

Actual result: A File Explorer window opens for you to select an image. 

## Regression status

Customer reports this is a regression as they always unload projects when they are not working on them at the time, and they never had this issue in the past. However in my attempts to do regression testing, I was having issues with the Designer agent not starting when I went back to  old (and matching) stable versions of Xamarin for VS and Xamarin tools on the Mac. But that is an issue for another report. 

##Environment

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Enterprise
Architecture and Modeling Tools   00322-80000-00000-AA815
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.
Microsoft Visual Studio Tools for Applications 2015   00322-80000-00000-AA815
Microsoft Visual Studio Tools for Applications 2015
Visual Basic 2015   00322-80000-00000-AA815
Microsoft Visual Basic 2015
Visual C# 2015   00322-80000-00000-AA815
Microsoft Visual C# 2015
Visual C++ 2015   00322-80000-00000-AA815
Microsoft Visual C++ 2015
Visual F# 2015   00322-80000-00000-AA815
Microsoft Visual F# 2015
Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA815
Windows Phone SDK 8.0 - ENU
Application Insights Tools for Visual Studio Package   7.16.00117.2
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2015.1   14.1.20907.0
ASP.NET and Web Tools 2015.1
ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/
Azure App Service Tools v2.9.5   14.0.20810.0
Azure App Service Tools v2.9.5
Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.
Azure Data Lake Tools for Visual Studio   2.1.0000.0
Microsoft Azure Data Lake Tools for Visual Studio
Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.
Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
GitHub.VisualStudio   2.1.1.5
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
JavaScript Language Service   2.0
JavaScript Language Service
JavaScript Project System   2.0
JavaScript Project System
Microsoft .NET Core Tools (Preview 2)   14.1.20907.0
Microsoft .NET Core Tools (Preview 2)
Microsoft Azure Hive Query Language Service   2.1.0000.0
Language service for Hive query
Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools
Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.41025.2
NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Analysis Services   13.0.1700.281
Microsoft SQL Server Analysis Services Designer 
Version 13.0.1700.281
SQL Server Data Tools   14.0.60923.0
Microsoft SQL Server Data Tools
SQL Server Integration Services   
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5
SQL Server Reporting Services   13.0.1700.281
Microsoft SQL Server Reporting Services Designers 
Version 13.0.1700.281
ToolWindowHostedEditor   1.0
Hosting json editor into a tool window
TypeScript   1.8.36.0
TypeScript tools for Visual Studio
Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Xamarin   4.2.2.11 (00fa5cc)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Inspector Support   1.0.0.0 (1f3067d)
Adds support for inspecting Xamarin and WPF apps.
Xamarin.Android   7.0.2.42 (501e63c)
Visual Studio extension to enable development for Xamarin.Android.
Xamarin.iOS   10.3.1.8 (7beaef4)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 Jordan Wieb 2017-06-14 19:56:40 UTC
Jon Goldberger, you are a lifesaver. I wasted almost 2 days of work trying to figure this out. Never once did it occur to me that it might have anything to do with my Android project being unloaded. 

I developed the Android portion of my project with iOS unloaded and everything was fine, figured I could do the same with Android. Since I had a large number of other issues related to older versions of the Xamarin Visual Studio extensions, I figured it must have been just another of those, even though I had updated to the latest versions of everything, but I couldn't find *ANYTHING* on this online.

I only managed to track this down from a forum post that contained a query for remaining asset catalog bugs.
Comment 3 Jon Douglas [MSFT] 2017-07-10 21:09:50 UTC
*Bookkeeping Note:

This behavior seems to only happen in Visual Studio for Windows, thus I am adding the appropriate tags indicating so.
Comment 6 Lars Ryssel 2017-11-13 10:42:22 UTC
The link with fix is not public you get a 404
I am having the same problem.
Is there a workaround or when is the fix released?
Comment 7 Michael Shapiro 2018-01-09 17:44:14 UTC
It's not fixed yet and the link above is dead. When is the expected time for this bug to be fixed????
Comment 8 Michael Shapiro 2018-03-03 18:23:02 UTC
Please, can you provide any update if the fix has been released yet?