Bug 24150 - Opening the iOS Build properties changes the MtouchArch on unmodified template projects
Summary: Opening the iOS Build properties changes the MtouchArch on unmodified templat...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.7
Hardware: PC Windows
: High normal
Target Milestone: 3.9.1
Assignee: Juan Marcelo Tondato
Depends on:
Reported: 2014-10-29 23:37 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-01-16 11:31 UTC (History)
8 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 Brendan Zagaeski (Xamarin Team, assistant) 2014-10-29 23:37:18 UTC
Opening the iOS Build properties changes the MtouchArch on unmodified template projects.

## Steps to reproduce

1. Create a new Unified API "Visual C# -> iOS -> iPhone -> Blank App (iPhone)" app. (The Classic API "Blank App" also demonstrates the same behavior).

2. Ensure that you've paired successfully to the Mac build host.

3. Set the "Build -> Configuration Manager -> Active solution platform" to "iPhoneSimulator".

4. Right click the project name in the solution browser, and select "Properties".

5. Navigate to the "iOS Build" sub-tab if it isn't already selected.

6. Note that the properties tab shows an asterisk, indicating that something has changed.

7. Save the project properties tab, and close it.

## Result

The `.csproj` file has been modified for the "Debug|iPhoneSimulator" configuration.

The most problematic change is the following line:
> <MtouchArch>Default, ARMv7</MtouchArch>

The original version of this line before step 7 was correct:
> <MtouchArch>i386, x86_64</MtouchArch>

The following additional lines are also added:
> <MtouchSdkVersion>8.1</MtouchSdkVersion>
> <MtouchProfiling>False</MtouchProfiling>
> <MtouchExtraArgs />
> <MtouchFastDev>False</MtouchFastDev>
> <MtouchEnableGenericValueTypeSharing>True</MtouchEnableGenericValueTypeSharing>
> <MtouchUseLlvm>False</MtouchUseLlvm>
> <MtouchUseThumb>False</MtouchUseThumb>
> <MtouchUseSGen>False</MtouchUseSGen>
> <MtouchUseRefCounting>False</MtouchUseRefCounting>
> <MtouchOptimizePNGs>True</MtouchOptimizePNGs>
> <MtouchI18n />

## Expected result

Either the `MtouchArch` element in the template project files should match the value added by step 7, or step 7 should leave the `MtouchArch` element unchanged.

- For the Unified API "Blank App" template project, the "Debug|iPhoneSimulator" configuration has "<MtouchArch>i386, x86_64</MtouchArch>".

- For the Classic API "Blank App" template project, the "Debug|iPhoneSimulator" configuration has NO `MtouchArch` element.

The other elements cause some extra "flux" if you're managing the `.csproj` file with under source control, but they might all be correct. The `MtouchArch` element is a special case because it's not clear what the correct setting for `MtouchArch` is in a Classic API app or a Unified API app.

## Version information

Xamarin (e78d10d6993f95fc3ebe791aeb4aacff165bf8bb)
Xamarin.Android (0ef616ae42005ece52f6df7aa1e093ceb11998f8)
Xamarin.iOS (209abebbd8f1a292d042420edb45fa5fbd3f017b)

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

### Mac build host

Xamarin.iOS (Business Edition)
Hash: 08968c4
Build date: 2014-10-20 21:48:06-0400

Mono 3.10.0 ((detached/e204655)
Xcode 6.1 (6604), Build 6A1052d
Mac OS X 10.9.5
Comment 1 Udham Singh 2014-10-30 06:21:21 UTC
I have checked this issue with the help of steps provided in bug description and observed the same behaviour.

Screencast : http://www.screencast.com/t/r5KLrO2IC

Environment Info : 

Windows 8
VS 2013
Xamarin.iOS Build Host
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2014-11-05 02:17:58 UTC
Regression status: regression, but it's an old regression.

Windows: Xamarin (0b2a123923812a88ed3091909478dbe9e0111f00)
Mac build host: Xamarin.iOS

Windows: Xamarin (2349ba7b70529ea26ba842e1ec32d054bd6abb3b)
Mac: Xamarin.iOS

Windows: Xamarin for Visual Studio (b3acb09afda91828e5bd48308ac8e7433d30f330)
Mac: Xamarin.iOS 

Windows: Xamarin.iOS   1.10.47 (3d6a125d)
Mac: Xamarin.iOS

## "Good" results

On Xamarin.iOS 1.10.47, opening the project properties pane does not automatically alter the settings. No asterisk appears on the tab unless the user makes a change.

## Additional information

The underlying cause for the "most problematic" part of this bug might also explain bug 19240. It looks like one of the changes in XamarinVS 1.12 broke the way that the "Project Properties -> iOS Build -> Advanced [tab] -> Supported architectures" drop-down menu was reading information from the `.csproj` file.
Comment 3 Juan Marcelo Tondato 2014-11-14 11:17:19 UTC
commit: 21cd84258dd558d2a12838d20aa165d99d58f026
wrench: 415ccc5998832b979989c6c1b74a425abf346982
Comment 4 Udham Singh 2014-11-26 09:17:08 UTC
I have checked this issue with the help of instructions provided in bug description and below are my observations.

1.For Unified API "Blank App" template project:

After step 7, line '<MtouchArch>i386, x86_64</MtouchArch>' has been changed into '<MtouchArch>Default, i386, x86_64</MtouchArch>' and following additional lines are added.

<MtouchExtraArgs />
<MtouchI18n />

2. For Classic API "Blank App" template projects:

After step 7 following lines have been added in .csproj file.

<MtouchExtraArgs />
<MtouchFastDev>False</MtouchFastDev>    <MtouchEnableGenericValueTypeSharing>True</MtouchEnableGenericValueTypeSharing>
<MtouchArch>Default, i386</MtouchArch>
<MtouchI18n />

Please refer the screencast for both Unified and Classic : http://www.screencast.com/t/WLuXtQX0

Please have a look on the screencast and above observations and let me if it is expected behaviour.

Environment Info :

Windows 8
VS 2013
Xamarin.iOS Build Host :
Comment 5 Mohit Kheterpal 2014-12-22 11:25:36 UTC
Still looking to connect with Juan Marcelo Tondato to discuss to verifying this
Comment 7 Udham Singh 2015-01-15 07:31:09 UTC
I have checked this issue with following builds

Environment Info :

Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.50938

Xamarin (e36f3f3)

And observed that now we are getting expected behavior mentioned in bug description. Hence closing this issue.