Bug 12305 - MT0000 using mtouch
Summary: MT0000 using mtouch
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-05-20 12:56 UTC by Megz Bailey
Modified: 2013-06-14 05:18 UTC (History)
3 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 Megz Bailey 2013-05-20 12:56:07 UTC
Megan-Bailey-JPMChase:Projects Admin$ /Developer/MonoTouch/usr/bin/mtouch -sim /Users/Admin/Projects/hello/hello/bin/iPhoneSimulator/Debug/hello.app /Users/Admin/Projects/hello/hello/bin/iPhoneSimulator/Debug/hello.exe 
Framework does not exist /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
   Platform = iPhoneSimulator
   SDK = 
   Deployment Version: 3.0
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.IO.DirectoryNotFoundException: Could not find a part of the path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/SDKSettings.plist".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0 
  at System.IO.File.ReadAllBytes (System.String path) [0x00000] in <filename unknown>:0 
  at MTouch.FromPList (System.String name) [0x00000] in <filename unknown>:0 
  at MTouch.GetSimulatorGccFlags () [0x00000] in <filename unknown>:0 
  at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
  at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0
Comment 1 Sebastien Pouliot 2013-05-21 08:33:41 UTC
This should not happen (the MT0000 generic error message*) but the reason the command line does not work is that it's missing some mandatory options, in this case which SDK version to use (e.g. --sdk=X.Y where X.y could be 6.1 for iOS 6.1).

There are quite a few options required to build an application from the command-line. The best way to see all of them is to look at the build output of a project inside Xamarin Studio.

* I'll fix this to report a better error message.
Comment 2 Sebastien Pouliot 2013-05-22 10:16:17 UTC
Fixed in 2ca15b657beb45411a8d66bd0cef0ba9730c01d7 (master)

Future releases (the first maintenance, i.e. non-hotfix, version after 6.2.6) will report an error if no SDK is specified. E.g.

error MT0025: No SDK version was provided. Please add --sdk=X.Y to specify which iOS SDK should be used to build your application.
Comment 3 narayanp 2013-06-14 05:18:11 UTC
Today I have checked this issue with following builds:

X.S 4.0.8
Xamarin.iOS 6.3.6-76
Mono 3.0.11

Now we are seeing the error which is mentioned in Comment#2

nischals-Mac-mini:~ nischal$ /Developer/MonoTouch/usr/bin/mtouch -sim /Users/nischal/Projects/SingleAppsiOS/SingleAppsiOS/bin/iPhoneSimulator/Debug/SingleAppsiOS.app /Users/nischal/Projects/SingleAppsiOS/SingleAppsiOS/bin//iPhoneSimulator/Debug/SingleAppsiOS.exe
Xamarin.iOS: USING STAGING SERVER FOR ACTIVATION
Framework does not exist /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
   Platform = iPhoneSimulator
   SDK = 
   Deployment Version: 3.0
error MT0025: No SDK version was provided. Please add --sdk=X.Y to specify which iOS SDK should be used to build your application.

Changing the status to Verified.