Bug 34399 - dSYM created incorrectly when building archive with mdtool on command line
Summary: dSYM created incorrectly when building archive with mdtool on command line
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 5.9
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2015-09-29 10:58 UTC by John Miller [MSFT]
Modified: 2015-09-29 14:13 UTC (History)
5 users (show)

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

Test Case (164.62 KB, application/zip)
2015-09-29 10:58 UTC, John Miller [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 or GitHub 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 John Miller [MSFT] 2015-09-29 10:58:18 UTC
Created attachment 13126 [details]
Test Case


   While building an archive for an iOS project, the .dSYM file is generated incorrectly between subsequent builds if something small like a version number is changed in the info.plist. 

Possibly related to #27419.

**Steps to Reproduce:**

1. Open terminal to the location of the .sln file

2. Execute /Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v archive -configuration:"Release|iPhone" -p:HelloXamarin.iOS HelloXamarin.sln

3. Change the version in HelloXamarin/iOS/Info.plist via text editor, then save the file.

4. Execute /Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v archive -configuration:"Release|iPhone" -p:HelloXamarin.iOS HelloXamarin.sln

5. Compare the sizes of the xcarchives/.dSYMs generated.

**Actual Results:**

   The first time, the .dSYM is 42 MB, the second time it is only 17 KB.

**Expected Results:**

   The .dSYM should be roughly the same each time. 

**Build Date & Platform:**

   Xamarin Details:
=== Xamarin Studio ===

Version 5.9.5 (build 10)
Installation UUID: f61f9313-d88e-46fb-8d91-ce5e07b042fc
Mono 4.0.3 ((detached/d6946b4)
GTK+ 2.24.23 (Raleigh theme)

Package version: 400030020

=== Apple Developer Tools ===

Xcode 6.4 (7720)
Build 6E35b

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 2c66d2f
Branch: master
Build date: 2015-08-04 13:52:25-0400

=== Xamarin.Android ===

Not Installed

=== Xamarin Android Player ===

Version: 0.0.25
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 509050010
Git revision: 48d16bc4f12ce3938964fc7c3d72fdc6887ad4ad
Build date: 2015-08-18 16:55:24-04
Xamarin addins: c2d51b360ad9f59e689046d47030df27de28f94a

=== Operating System ===

Mac OS X 10.10.5

I also tried on Alpha with XI 9.2
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-09-29 11:13:37 UTC
This sounds like the rebuilding logic in the MSBuild tasks is wrong.

@Jeff, can you have a look?
Comment 2 John Miller [MSFT] 2015-09-29 11:18:35 UTC
Also, if anyone can clarify is mdtool should not be used, and msbuild should be used instead, that would be great. And if so, how do you generate archives with msbuild?

The comments here hint at something: http://stackoverflow.com/a/29043899
Comment 3 Jeffrey Stedfast 2015-09-29 13:46:50 UTC
Chris Hardy reported this a while ago and I've already fixed it, but it's not in iOS 8.10.
Comment 4 Andy C 2015-09-29 14:13:28 UTC
What version is this fixed in? John Miller tested this on Alpha with XI 9.2 and still had issues.