Bug 40324 - Creating a new Xamarin.Mac application fails on initial build
Summary: Creating a new Xamarin.Mac application fails on initial build
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: mmp ()
Version: 2.8.0 (C7)
Hardware: Macintosh Mac OS
: High normal
Target Milestone: 2.8.0 (C7)
Assignee: Vincent Dondain [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-04-13 04:48 UTC by Scott Stillwell
Modified: 2016-05-19 06:23 UTC (History)
6 users (show)

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

Description Scott Stillwell 2016-04-13 04:48:27 UTC
Description of Problem:  Creating a new Solution for a Xamarin.Mac application fails on trying to build/run even with no changes to the Solution.  Xamarin Studio 6.0 build 4968


Steps to reproduce the problem:
1. Create new Xamarin.Mac Cocoa App in C#
2. Give the project a name and location to save, accepting other defaults.


Actual Results:
Tool exited with code: 1. Output: Xamarin.Mac 2.8.0.244 (cycle7: 977921b)
Selected target framework: Xamarin.Mac,v2.0; API: Unified
Added assembly /Library/Frameworks/Xamarin.Mac.framework/Versions/2.8.0.244/lib/mono/Xamarin.Mac/System.dll
Added assembly /Library/Frameworks/Xamarin.Mac.framework/Versions/2.8.0.244/lib/mono/Xamarin.Mac/mscorlib.dll
Added assembly /Library/Frameworks/Xamarin.Mac.framework/Versions/2.8.0.244/lib/mono/Xamarin.Mac/System.Xml.dll
Added assembly /Library/Frameworks/Xamarin.Mac.framework/Versions/2.8.0.244/lib/mono/Xamarin.Mac/System.Core.dll
Added assembly /Library/Frameworks/Xamarin.Mac.framework/Versions/2.8.0.244/lib/x86_64/mobile/Xamarin.Mac.dll
Added assembly /Library/Frameworks/Xamarin.Mac.framework/Versions/2.8.0.244/lib/mono/Xamarin.Mac/System.Net.Http.dll
Added assembly /Users/scott/src/LicenseHelper/LicenseHelper/bin/Debug/LicenseHelper.exe
System.FormatException: Input string was not in a correct format.
  at System.Version+VersionResult.SetFailure (ParseFailureKind failure, System.String argument) <0x11689be00 + 0x00085> in <filename unknown>:0 
  at System.Version.TryParseComponent (System.String component, System.String componentName, System.VersionResult& result, System.Int32& parsedComponent) <0x11049fdc0 + 0x00060> in <filename unknown>:0 
  at System.Version.TryParseVersion (System.String version, System.VersionResult& result) <0x11049ee10 + 0x00113> in <filename unknown>:0 
  at System.Version.Parse (System.String input) <0x1105d7810 + 0x000ad> in <filename unknown>:0 
  at Xamarin.Bundler.Driver.SetSDKVersion () <0x116882940 + 0x0027b> in <filename unknown>:0 
  at Xamarin.Bundler.Driver.Compile (IEnumerable`1 internalSymbols) <0x116880000 + 0x001fd> in <filename unknown>:0 
  at Xamarin.Bundler.Driver.Pack (IList`1 unprocessed) <0x1105dc740 + 0x00eb8> in <filename unknown>:0 
  at Xamarin.Bundler.Driver.Main2 (System.String[] args) <0x11054b670 + 0x031d6> in <filename unknown>:0 
  at Xamarin.Bundler.Driver.Main (System.String[] args) <0x1104998a0 + 0x00069> in <filename unknown>:0 


Expected Results:
Project should build


How often does this happen? 
Every time.


Additional Information:
OS X 10.11.4
Comment 1 Vincent Dondain [MSFT] 2016-04-13 12:14:41 UTC
Hi Scott,

Could you please copy and paste your products info: Xamarin Studio > About Xamarin Studio > Show details?

Also I think you only sent us part of your build output.
Could you make sure that in your Xamarin Studio preferences in Project > Build, the log verbosity is set to Diagnostic, then rebuild and give us the full output?

We usually use https://gist.github.com to send large output data.

I cannot reproduce that locally but with more info we might be able to understand what is happening here.

Thanks.
Comment 2 Scott Stillwell 2016-04-13 15:06:28 UTC
Xamarin Studio > About Xamarin Studio > Show Details:

https://gist.github.com/sstillwell/334591ad4320b0a505a58dbe454b3134

Verbose build log:

https://gist.github.com/sstillwell/3020a4103f7584c57b929a462fcddb65

Thanks
Comment 3 Scott Stillwell 2016-04-13 17:13:54 UTC
Sorry, I said "Verbose" build log, but it in fact IS Diagnostic.
Comment 4 Lluis Sanchez 2016-04-14 13:04:40 UTC
Info provided.
Comment 5 Vincent Dondain [MSFT] 2016-04-18 16:05:56 UTC
Hi Scott,

Can I ask you to ls in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs ?

I can't reproduce that bug locally and the code that parses looks fine. I'm wondering if there isn't anything special in SDKs.

Thanks.
Comment 6 Scott Stillwell 2016-04-18 17:48:21 UTC
Sorry, was away from the office earlier.  

https://www.dropbox.com/s/ndq0dlwvixpzm0h/Screenshot%202016-04-18%2012.41.02.png?dl=0

I have older SDKs installed via XcodeLegacy.sh, due to the need to compile other C++ code for older platforms.
Comment 7 Vincent Dondain [MSFT] 2016-04-18 18:56:30 UTC
Alright, I just fixed it in our master branch(commit:bb5dc196aed98ae74bfae9e75446441f8f676f5e) and it will also be included in our next major release.

We didn't expect that MacOSX10.4u.sdk, all good now. You should soon have a new Xamarin.Mac in the alpha channel that has the fix.

Thanks for reporting this issue to us.

Vincent.
Comment 8 Scott Stillwell 2016-04-19 04:51:45 UTC
Just to confirm...if I temporarily rename the *10.4u.SDK folder to *10.4.SDK instead, the build succeeds.  I've put it back to the correct name and have switched to the Alpha channel to await a corrected build.

Thank YOU for the quick response.
Comment 9 Rajneesh Kumar 2016-05-12 10:41:30 UTC
I have tried to reproduce this issue with same builds as Scott mentioned but I am not seeing this Issue with builds (XS 6.0.0.4968 And X.Mac 2.8.0.244). 

1. I created and Mac cocoa application
2. Run the application in debug and release mode

Application working fine at my end.

@Vincent, Could you please let me know if I am missing any step here to reproduce this Issue? So that I can verify it on latest builds
Comment 10 Vincent Dondain [MSFT] 2016-05-12 11:12:09 UTC
@rajneesh the issue happened because Scott had a universal mac sdk installed.

To repro (and verify my fix) you'd need to duplicate one of the mac sdks here:
>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
and change its name to include a letter after the version number.

Something like: MacOSX10.11u.sdk for instance.
Comment 11 Saurabh 2016-05-19 06:23:55 UTC
Thanks @Vincent for providing steps to reproduce. I am here able to reproduce this issue with X.Mac 2.8.0.244. This is the build output for the same: https://gist.github.com/saurabh360/3f7985bdf54effb834912b6f21831310

I have checked the same with latest Cycle 7 build (X.Mac 2.8.0.318). Now this is working fine. This is the build output for the same: https://gist.github.com/saurabh360/a3c0dfca36a1b76ecad584c6bef6f23e
Application Output: https://gist.github.com/saurabh360/6fe6e39ef02c2ba1c4172feee24c1907