Bug 29323 - "Project Properties -> iOS Build -> Advanced -> Internationalization" setting gets lost when project properties are repeatedly closed and reopened
Summary: "Project Properties -> iOS Build -> Advanced -> Internationalization" setting...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- normal
Target Milestone: 4.1.0 (C7)
Assignee: Bugzilla
URL:
: 35553 37400 39797 39863 ()
Depends on:
Blocks:
 
Reported: 2015-04-22 14:09 UTC by Gerco Brandwijk
Modified: 2016-03-23 18:06 UTC (History)
13 users (show)

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


Attachments
Testproject, just in case (24.10 KB, application/x-zip-compressed)
2015-04-22 14:09 UTC, Gerco Brandwijk
Details
Screen capture demonstrating the problem (1.49 MB, application/x-shockwave-flash)
2016-01-11 23:58 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


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:
VERIFIED FIXED

Description Gerco Brandwijk 2015-04-22 14:09:48 UTC
Created attachment 10870 [details]
Testproject, just in case

Using Visual Studie 2013 with the latest Stable releases installed.

When you check some of the boxes of Internationalization at the Project Settings (right click on project -> Properties -> iOS Build -> 'Advanced' -> Internationalization) of an iOS Universal Project, after a few click the changes are not remembered anymore.

To reproduce:
1. Create new blank iOS Universal project in new solution
2. Go to properties of this project
3. Check the checkbox of the internationalization 'west'
4. Save all the files
5. Close the Properties tab
6. Go again to the properties of the project
7. Probably you will see a * behind 'iOS Build' which means changed, but there is nothing changed because we saved it
8. Verify if the checkbox before 'west' is still checked
9. When unchecked: you reproduced the problem. When checked: save it again and reopen
10. Sometimes it goes fine for a few times, but after a few reloads op the project properties the checked boxes are unchecked suddenly.

This proplem is driving me crazy, because I'm using a ZIP file with content in it wherefore I need that west encoding, but once in a while my app is crashing and than in most of the cases this checkbox is suddenly unchecked.

Regards,
Gerco Brandwijk
Comment 1 pharout734 2015-10-21 11:14:05 UTC
I am also experiencing this bug where internationalization settings are either not being saved, or are reverting to unchecked.  It is very frustrating to release a build only to find out later that this setting unchecked itself and now the build crashes.

Does anyone from Xamarin need help confirming this?  Or is there anything else I can do to help push this forward?

Thanks,
Matt
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2016-01-11 23:57:13 UTC
## Regression status: not a recent regression

BAD: XamarinVS 4.0.1.60   (7082690)
BAD: XamarinVS 4.0.0.1689 (f860fe4)
BAD: XamarinVS 3.11.1594  (a06d6d5)
BAD: XamarinVS 3.9.547.0  (20fd2f0)
BAD: XamarinVS 3.7.165.0  (0e2a0c5)




## Slightly simplified steps I followed to replicate

1. Create a new "Visual C# -> iOS -> iPhone -> Blank App (iPhone)" app.

2. Open "Project Properties -> iOS Build -> Advanced [tab]".

3. Under "Internationalization", enable the "west" checkbox. In my tests, I had to click the checkbox _twice_ to see a checkmark in it.

4. Save the project properties and close them.

5. Repeat step 2.

6. Check if the "west" checkbox is still enabled. If it is, repeat steps 4 and 5.




## Results

The checkbox eventually loses the check mark after several repetitions of step 6, even though the user has made no changes to the project properties. If the user saves the project properties at this point (for example to save a change to another property), the incorrect value for internationalizations will be saved into the `<MtouchI18n>` property in the `.csproj` file.


(Note that other check boxes on the same tab such as "Use LLVM..." stay enabled properly.)




## Additional version information from my test environment

Microsoft Visual Studio Professional 2013
Version 12.0.40629.00 Update 5

Windows 10, 64-bit, on a physical PC
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2016-01-11 23:58:07 UTC
Created attachment 14547 [details]
Screen capture demonstrating the problem
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2016-01-11 23:58:34 UTC
## Small recommendation for users until the bug is fixed: add an error to detect the problem

This is a suggestion from user on duplicate Bug 35553. The idea is to detect if the 'west' internationalization is missing at build time as a way to safeguard against publishing builds that are missing the necessary encodings.

One way to achieve this is to add the following three lines at the bottom of the iOS app project `.csproj` file, immediately before the closing `</Project>` tag (remove the > greater-than character from the beginning of each line):

> <Target Name="MtouchI18nCheck" BeforeTargets="Build">
>   <Error Condition="$(MtouchI18n) != 'west'" Text="This project requires west encodings, but they were removed. Go to the Properties of the $(RootNamespace) project, open the 'Advanced' tab under 'iOS Build' and check the box for 'west' under 'Internationalization'." />
> </Target>
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2016-01-12 00:07:35 UTC
*** Bug 35553 has been marked as a duplicate of this bug. ***
Comment 7 Brendan Zagaeski (Xamarin Team, assistant) 2016-01-12 00:09:15 UTC
*** Bug 37400 has been marked as a duplicate of this bug. ***
Comment 8 xamarin-release-manager 2016-01-19 13:23:32 UTC
Fixed in version 99.0.0.1110 (master)

Author: jmt
Commit: 4b7d35a47c0b10f5693e371aa61706774995cef7 (xamarin/XamarinVS)
Comment 10 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-17 00:15:19 UTC
## Verification status: verified fixed on the latest Cycle 7 Preview Alpha builds

GOOD: XamarinVS 4.1.0.111 (a78562a)
BAD:  XamarinVS 4.0.1.145 (f869dba)


- GOOD: On 4.1.0.111, I was unable to replicate the problem even after closing and reopening the properties 20 times.

- BAD: On 4.0.1.145, I was consistently able to replicate the problem after closing and reopening the properties 2 times.
Comment 11 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-21 16:01:25 UTC
*** Bug 39797 has been marked as a duplicate of this bug. ***
Comment 12 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-23 18:06:34 UTC
*** Bug 39863 has been marked as a duplicate of this bug. ***