Bug 39731 - Image slicing info removed from Contents.json when editing and saving an Image Set that had slicing info from XCode.
Summary: Image slicing info removed from Contents.json when editing and saving an Imag...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: High normal
Target Milestone: 4.2.0 (C8)
Assignee: Bugzilla
Depends on:
Reported: 2016-03-17 17:30 UTC by Jon Goldberger [MSFT]
Modified: 2016-07-04 18:38 UTC (History)
4 users (show)

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

Test Project (63.10 KB, application/zip)
2016-03-17 17:30 UTC, Jon Goldberger [MSFT]

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 Jon Goldberger [MSFT] 2016-03-17 17:30:50 UTC
Created attachment 15442 [details]
Test Project

## Description

Xcode allows you to create a 9-patch image directly in the Asset Catalog Image Set editor. You can use this sliced up image set in Xamarin (except slicing won't be displayed in iOS Designer [bug #39703, bug #39704], but will on simulator/device). However if the image set is edited and saved in Visual Studio, the slicing info is removed. 

IOW, here is what I see in a sliced up Image Set when that image set is created and sliced up in Xcode:

>    {
>      "resizing" : {
>        "mode" : "9-part",
>        "center" : {
>          "mode" : "tile",
>          "width" : 81,
>          "height" : 16
>        },
>        "cap-insets" : {
>          "bottom" : 46,
>          "top" : 5,
>          "right" : 4,
>          "left" : 6
>        }
>      },
>      "idiom" : "universal",
>      "filename" : "Einstein.png",
>      "scale" : "1x"
>    }

After making a change and saving, the resizing info is gone:

>      "filename": "Einstein.png",
>      "scale": "1x",
>      "idiom": "universal"

## Steps to reproduce

1. Open the attached test project in Visual Studio (or Xamarin Studio, separate bug filed for XS, bug #39730)

2. Open Contents.json in a text editor. Note the resizing info as above.

3. Add an image to the image set and save.

4. Open Contents.json in a text editor. 

Expected result: Resizing info would still be there.

Actual result: Resizing info is removed. 

## Environment

## Environment

Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Professional

Visual Basic 2015   00322-40000-00000-AA850
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA850
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA850
Microsoft Visual C++ 2015

Visual F# 2015 RC   00322-40000-00000-AA850
Microsoft Visual F# 2015 RC

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA850
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   14.0.20626.0
ASP.NET and Web Tools

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

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

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.2.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 Data Tools   14.0.50616.0
Microsoft SQL Server Data Tools

Visual Studio Tools for Universal Windows Apps   14.0.23309.00 d14oob
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 (f869dba)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

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

Xamarin.iOS (49ba15e)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 xamarin-release-manager 2016-05-20 15:59:12 UTC
Fixed in version (master)

Author: Jose Gallardo
Commit: 7065913d54130bb5416ff9b8dc4049ec01d1d223 (xamarin/XamarinVS)