Bug 8248 - Unexpected compiler error building MvvmCross
Summary: Unexpected compiler error building MvvmCross
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-11-06 14:19 UTC by Stuart Carnie
Modified: 2012-11-07 17:04 UTC (History)
2 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 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 Stuart Carnie 2012-11-06 14:19:31 UTC
Tried with MonoTouch 6.0.4 / MonoDevelop and MonoTouch 6.0.6 / MonoDevelop 3.0.5.

error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.NullReferenceException: Object reference not set to an instance of an object
  at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
  at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0 

Steps to reproduce:

1. Check out: https://github.com/scarnie/MvvmCross
2. Ensure you're on vNext branch (default)
3. Open MvvmCross_All solution
4. Ignore errors for Android and Windows builds
5. Find the Tutorial.UI.Touch project
6. RMB and Build

This error will occur.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-11-07 07:07:12 UTC
There's a reference to System.Windows (which MonoTouch doesn't have).

Does removing that reference fix the problem for you?
Comment 2 Stuart Carnie 2012-11-07 15:49:04 UTC
There is a type forwarding assembly in the solution.  The project is called System.Windows.Touch, which generates System.Windows.dll.  If I remove the missing one it does indeed compile correctly.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-11-07 17:04:13 UTC
Closing this then.

We've already implemented better error reporting, for later releases we'll tell you what's wrong instead of throwing a NullReferenceException.