Bug 29399 - Better error message when "Include the Mono Runtime in the application bundle" is selected for Debug configuration (Classic API)
Summary: Better error message when "Include the Mono Runtime in the application bundle...
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: MSBuild ()
Version: 2.0.0
Hardware: Macintosh Mac OS
: Normal enhancement
Target Milestone: master
Assignee: Chris Hamons
Depends on:
Reported: 2015-04-24 22:59 UTC by Jon Goldberger [MSFT]
Modified: 2015-10-06 17:21 UTC (History)
1 user (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 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 Jon Goldberger [MSFT] 2015-04-24 22:59:00 UTC
## Description

A customer was having to clean his project every time before a build. The issue turned out to be having the "Include the Mono Runtime in the application bundle" enabled for Debug builds. (This option can no longer be set in the GUI for Unified API projects, however it is still set in the .csproj file... I assume to avoid this sort of issue and forcing the correct configurations to include the mono runtime.)

The error received is simply: 

>error MM0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
>System.IO.EndOfStreamException: Failed to read past end of stream.
>  at System.IO.BinaryReader.FillBuffer (Int32 numBytes) [0x00000] in <filename unknown>:0 
>  at System.IO.BinaryReader.ReadUInt32 () [0x00000] in <filename unknown>:0 
>  at Xamarin.MachOFile.Read (System.IO.BinaryReader reader) [0x00000] in <filename unknown>:0 
>  at Xamarin.FatEntry.ReadEntry (System.IO.BinaryReader reader) [0x00000] in <filename unknown>:0 
>  at Xamarin.FatFile.Read (System.IO.BinaryReader reader) [0x00000] in <filename unknown>:0 
>  at Xamarin.MachO+<Read>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0 
>  at Xamarin.MachO.GetNativeDependencies (System.String libraryName) [0x00000] in <filename unknown>:0 
>  at MonoMac.Bundler.Driver.CopyDependencies (IEnumerable`1 libraries) [0x00000] in <filename unknown>:0 
>  at MonoMac.Bundler.Driver.Pack (IList`1 unprocessed) [0x00000] in <filename unknown>:0 
>  at MonoMac.Bundler.Driver.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
>  at MonoMac.Bundler.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 

Something along the lines of (if possible):
Please deselect the option  to "Include the Mono Runtime in the application bundle" for Debug builds in your project options. 

or some such.
Comment 1 Chris Hamons 2015-10-06 17:21:44 UTC
Most improvements to the Classic build system are not on the road map at this point, as we don't allow creation of new solutions of this type.