Bug 23856 - Designer removes comments
Summary: Designer removes comments
Status: CONFIRMED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android Designer ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Bugzilla
URL:
: 34558 ()
Depends on:
Blocks:
 
Reported: 2014-10-15 13:41 UTC by Tomasz Cielecki
Modified: 2017-07-11 17:56 UTC (History)
7 users (show)

Tags: vs ac
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 for Bug 23856 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
CONFIRMED

Description Tomasz Cielecki 2014-10-15 13:41:57 UTC
Adding comments to your axml file in the source with: <!-- comment --> gets removed if you go to the designer tab and then back to the source.

Please don't strip out comments as they can contain Licensing of the file etc.

Screencast: http://youtu.be/doygbQwFqUE

Version info:

Microsoft Visual Studio Ultimate 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.8.13.0 (bac482f9243027fe741cdc40d8b896113d34cf7f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.18.0.34 (3b7ef0a796e8744972c48034403a6e7cb7ec189e)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.2.0.0 (13fec5ef6bd1d2992ae58cc5147d0e3f988792ca)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Arpit Jha 2014-10-16 03:04:38 UTC
I have checked this issue and unable to reproduce it.

I tried following steps to reproduce it.

1.Create A Xamarin Android application.
2.Open Designer source file.
3.Insert some comment in source file.
4.Switch to designer file of Application


We observed that designer doesn't removes comment when switch from source to designer window of android application. 

Screencast regarding Same:
http://screencast.com/t/NBhARx3vUWef

Let me know if I missed anything to reproduce it?

Environment Info:
VS professional 2013 Update 3
XVS 3.8.13.0
Comment 2 Tomasz Cielecki 2014-10-16 07:11:51 UTC
Try make your comment between the xml declaration and the root element. I can reproduce this on both my machines.

So if you do this:

    <?xml version="1.0" encoding="utf-8"?>
    <!-- comment 1 -->
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <Button
            android:id="@+id/MyButton"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="@string/Hello" />
        <!-- comment 2 -->
    </LinearLayout>

You will see comment 1 disappear, comment 2 stays.
Comment 3 Arpit Jha 2014-10-16 07:33:48 UTC
I have checked this issue and able to reproduce it with the help of Comment 2.

We are getting same behavior as mentioned in bug description.

Screencast regarding same:
http://screencast.com/t/DOB9UdX3ZGWf

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional


Xamarin   3.7.203.0 (ff146f5240189a2ec6d3c6f75cf3967f79c79a18)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.18.0.34 (3b7ef0a796e8744972c48034403a6e7cb7ec189e)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.2.0.0 (65b2f3a0f52f365b90ac952f0ec2e40fa0b510d4)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 4 Pierce Boggan [MSFT] 2017-07-10 14:29:54 UTC
*** Bug 34558 has been marked as a duplicate of this bug. ***