Bug 6240 - Error MT0000: Unexpected error - Please fill a bug report at http://bugzilla.xamarin.com (MT0000)
Summary: Error MT0000: Unexpected error - Please fill a bug report at http://bugzilla....
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.3.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2012-07-23 11:22 UTC by Tom Opgenorth
Modified: 2012-07-24 15:39 UTC (History)
2 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:
RESOLVED FIXED

Description Tom Opgenorth 2012-07-23 11:22:19 UTC
I get this error when trying to deploy my from MonoTouch to a device (tried with both iPod and iPhone 4S).  Happens with both the "Release | iPhone" and "Debug | iPhone" build configurations. Deploy to the simulator works no problem.

It does seem that when I do a "Clean All" first, then MonoDevelop will deploy the application to a device once. Subsequent attempts to deploy will fail, until a "Clean All" is performed a second time.

Here is the Version Information from "About Monodevelop":

MonoDevelop 3.0.3.4
Runtime:
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (2.12.0.0)
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.3.3 (1178)
	 Build 4E3002
Monotouch: 5.3.4
Mono for Android: 4.2.4.167234518
Android SDK: /Users/tom/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
	Version: 1.6	ApiLevel: 4
	Version: 2.1	ApiLevel: 7
	Version: 2.2	ApiLevel: 8
	Version: 2.3	ApiLevel: 10
	Version: 3.1	ApiLevel: 12
	Version: 4.0	ApiLevel: 14
	Version: 4.0.3	ApiLevel: 15
Java SDK: /usr/bin

Build information:
	Release ID: 30003004
	Git revision: 57eb8135299a707287d21a1e0ca1040babf6d9aa-dirty
	Build date: 2012-07-16 19:44:05+0000
	Xamarin addins: c331c3ba7ef02e9823ef5dfc9f6f9038f187158b
Operating System:
	Mac OS X 10.7.4
	Darwin sygin-2.local 11.4.0 Darwin Kernel Version 11.4.0
	    Mon Apr  9 19:32:15 PDT 2012
	    root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64




Here is the Build Output from MonoDevelop:


Building Solution: kijiji-sniper (Release|iPhone)

Building: kijiji-sniper (Release|iPhone)

Detecting signing identity...
Provisioning profile: "Buying Spy" (1DAE3B4C-6704-423B-8643-5499E22E3B43)
Signing Identity: "iPhone Developer: Tom Opgenorth (FCZG6SN6J5)"
App ID: "96MQ6YS36Q.com.buyingspy"
Performing main compilation...
/Developer/MonoTouch/usr/bin/smcs /noconfig "/out:/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/buyingspy.exe" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.ServiceModel.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.Linq.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" "/r:/Users/tom/work/kijiji-sniper.root/lib/HtmlAgilityPack.1.4.5/sl3-wp/HtmlAgilityPack.dll" /nologo /warn:4 /optimize+ /codepage:utf8 /t:exe "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Bootstrapper.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/BuildKijijiDetail.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/BuildKijijiUrl.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/ISniperDatabase.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/KijijiDetailsListDataSource.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/LocationDatabase.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/RunSnipe.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/SniperDatabase.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/KijijiFeedReader.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Globals.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Main.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/AppDelegate.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Messages/DisplayDetailsForKijijiItemMessage.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Messages/KijijiDetailSelectedMessage.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Messages/NewSnipeMessage.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Messages/SavedKijijiDetailMessage.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Messages/SearchForSnipeMessage.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Messages/SnipeUpdatedMessage.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Model/IIdentifiable.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Model/IKijijiLinkGuid.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Model/KijijiDetail.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Model/KijijiItem.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Model/Location.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Model/Snipe.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/SQLite.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/SQLiteAsync.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/TinyIoC.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/TinyMessenger.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Model/IHaveKijijiDetails.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/KijijiDetailsList/KijijiDetailsListTableViewDelegate.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/KijijiSearchResults/KijijiSearchResultsController.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/KijijiSearchResults/KijijiSearchResultsController.designer.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/KijijiSearchResultsDataSource.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/KijijiSearchResults/SearchResultsTableViewDelegate.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/SnipeList/SnipeListCellView.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/SnipeList/SnipeListController.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/SnipeList/SnipeListController.designer.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/AddSnipe/AddSnipeController.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/SnipeList/SnipeListCell.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/KijijiDetails/KijijiDetailsController.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/KijijiDetails/KijijiDetailsController.designer.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/KijijiDetailsList/KijijiDetailsListController.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/KijijiDetailsList/KijijiDetailsListController.designer.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/ControllerHelpers.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/SnipeListDataSource.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/SnipeList/SnipeListTableViewDelegate.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/MainTabBarController.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/LocationPickerModel.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/MVVM/RelayCommand.cs" "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/MVVM/ViewModelBase.cs" 
Compilation succeeded - 5 warning(s)

/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/SnipeList/SnipeListCellView.cs(36,29): warning CS0219: The variable `imageFrame' is assigned but its value is never used
/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/AppDelegate.cs(20,48): warning CS0169: The private field `KijijiSniper.AppDelegate._nc' is never used
/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/KijijiSearchResults/KijijiSearchResultsController.cs(19,42): warning CS0414: The private field `KijijiSniper.UI.KijijiSearchResults.KijijiSearchResultsController._db' is assigned but its value is never used
/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/SnipeList/SnipeListCellView.cs(15,37): warning CS0169: The private field `KijijiSniper.UI.SnipeList.SnipeListCellView._imgBadge' is never used
/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/UI/AddSnipe/AddSnipeController.cs(25,34): warning CS0169: The private field `KijijiSniper.UI.AddSnipe.AddSnipeController._saveSnipeButton' is never used



Copying content files
Copying '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Data/locations.csv' to '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/Data/locations.csv'
Copying '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Images/buyingspyicon_ipad@2x.png' to '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/buyingspyicon_ipad@2x.png'
Copying '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Images/buyingspyicon_iphone.png' to '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/buyingspyicon_iphone.png'
Copying '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Images/buyingspyicon_iphone@2x.png' to '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/buyingspyicon_iphone@2x.png'
Copying '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/Images/buyingspyicon_ipad.png' to '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/buyingspyicon_ipad.png'
Build complete -- 0 errors, 5 warnings

Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" -v --cache "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/obj/Release/mtouch-cache" --nomanifest --nosign -dev "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.ServiceModel.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.Linq.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Users/tom/work/kijiji-sniper.root/lib/HtmlAgilityPack.1.4.5/sl3-wp/HtmlAgilityPack.dll" -nolink -sdk "5.1" -targetver "5.1" --llvm --armv7 "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/buyingspy.exe"
MonoTouch version 5.3.4 using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
Copied /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/buyingspy.exe to /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/buyingspy.exe
Copied /Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll to /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/mscorlib.dll
Copied /Users/tom/work/kijiji-sniper.root/lib/HtmlAgilityPack.1.4.5/sl3-wp/HtmlAgilityPack.dll to /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/HtmlAgilityPack.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll to /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/System.Xml.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.dll to /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/System.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/Mono.Security.dll to /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/Mono.Security.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll to /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/System.Core.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll to /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/monotouch.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.Linq.dll to /Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/System.Xml.Linq.dll
error MT0000: Unexpected error - Please fill a bug report at http://bugzilla.xamarin.com
System.IO.FileNotFoundException: Could not find file "/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/System.Net".
File name: '/Users/tom/work/kijiji-sniper.root/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/System.Net'
  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 Cache.ComputeDigest (System.String a, Int32 pos) [0x00000] in <filename unknown>:0 
  at Cache.GetDigestForAssembly (System.String a) [0x00000] in <filename unknown>:0 
  at Cache.ComputeDependencies (System.String outputDir, IEnumerable`1 assemblies, MonoTouch.Tuner.MonoTouchResolver resolver) [0x00000] in <filename unknown>:0 
  at MTouch.CompileAssemblies (System.String aname, System.Collections.Generic.List`1 assemblies) [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 

---------------------- Done ----------------------

Build: 1 error, 5 warnings
Comment 1 Tom Opgenorth 2012-07-23 11:26:33 UTC
Forgot to mention: this also occurs when trying to publish to TestFlight.
Comment 2 Sebastien Pouliot 2012-07-23 12:10:05 UTC
Seems the new caching in 5.3.x is moving the error earlier when it's not reported correctly. Anyway it seems you have an assembly that refers to System.Net.dll (which exists only in Silverlight, not in MonoTouch).

Can you attach your binaries (or does this code exists in GIT somewhere) ?
Comment 4 Sebastien Pouliot 2012-07-23 14:07:44 UTC
The MT0000 (catch all) error occurs because the (managed) linker is disabled. Otherwise the error would be caught up earlier (and reported more gracefully, i.e. MT2002). I suspect you disabled the linker (on device builds) because of that error (since it should be "on" by default for the device builds). E.g.

Linking SDK only for assembly /Users/sebastienpouliot/git/kijiji-sniper/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/buyingspy.exe into /Users/sebastienpouliot/git/kijiji-sniper/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app
error MT2002: Could not resolve: System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
--- inner exception
System.IO.FileNotFoundException: Could not resolve: System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
  at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in <filename unknown>:0 
  at Mono.Linker.AssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in <filename unknown>:0 
  at Mono.Linker.LinkContext.Resolve (IMetadataScope scope) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.LoadReferencesStep.ProcessReferences (Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.LoadReferencesStep.ProcessReferences (Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.LoadReferencesStep.ProcessAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 
  at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, Mono.Linker.LinkContext& context, System.Collections.Generic.List`1& assemblies) [0x00000] in <filename unknown>:0 
---
  at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, Mono.Linker.LinkContext& context, System.Collections.Generic.List`1& assemblies) [0x00000] in <filename unknown>:0 
  at MTouch.LinkAssemblies (System.String main, System.Collections.Generic.List`1& assemblies, Boolean include_debug_info) [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 


What happens is that HtmlAgilityPack.dll is referencing System.Net.dll - that only exists in Silverlight (most of its type are in System.dll in the regular "desktop" .NET and in MonoTouch / M4A). When the linker process all assemblies it cannot find System.Net.dll and return an error.

Without using the linker the AOT compiler will produce "broken" code, e.g. "-v -v -v" will show you:

MONO_PATH=/Users/sebastienpouliot/git/kijiji-sniper/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app /Developer/MonoTouch/usr/bin/arm-darwin-mono --llvm --aot=mtriple=armv7-darwin,full,static,asmonly,direct-icalls,nodebug,llvm-path=/Developer/MonoTouch/LLVM/bin/,outfile=/var/folders/fI/fIDK1klFH6yDR8NRb2cq-++++TI/-Tmp-/tmp5d0d83e6.tmp/HtmlAgilityPack.dll.7.s "/Users/sebastienpouliot/git/kijiji-sniper/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/HtmlAgilityPack.dll"
Mono Ahead of Time compiler - compiling assembly /Users/sebastienpouliot/git/kijiji-sniper/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/HtmlAgilityPack.dll
Could not load signature of HtmlAgilityPack.HtmlWeb:LoadAsync due to: 
Could not load signature of HtmlAgilityPack.HtmlWeb:LoadAsync due to: 
Could not load signature of HtmlAgilityPack.HtmlWeb:ClientDownloadStringCompleted due to: 
Could not load signature of HtmlAgilityPack.HtmlWeb:LoadAsync due to: 
Could not load signature of HtmlAgilityPack.HtmlWeb:LoadAsync due to: 
Could not load signature of HtmlAgilityPack.HtmlWeb:ClientDownloadStringCompleted due to: 
Could not load signature of HtmlAgilityPack.HtmlWeb:LoadAsync due to: 
Could not load signature of HtmlAgilityPack.HtmlWeb:LoadAsync due to: 
Missing method .ctor in assembly /Users/sebastienpouliot/git/kijiji-sniper/kijiji-sniper/kijiji-sniper/bin/iPhone/Release/kijijisniper.app/HtmlAgilityPack.dll, type System.Net.NetworkCredential
Executing opt: /Developer/MonoTouch/LLVM/bin/op/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -gdwarf-2 -miphoneos-version-min=5.1 -arch armv7  -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -c /var/folders/fI/fIDK1klFH6yDR8NRb2cq-++++TI/-Tmp-/tmp5d0d83e6.tmp/HtmlAgilityPack.dll.7.s -o /var/folders/fI/fIDK1klFH6yDR8NRb2cq-++++TI/-Tmp-/tmp5d0d83e6.tmp/HtmlAgilityPack.dll.7.ot -f -simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loopsimplify -domfrontier -loopsimplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loopsimplify -lcssa -iv-users -indvars -loop-deletion -loopsimplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -simplifycfg -preverify -domtree -verify -o /var/folders/fI/fIDK1klFH6yDR8NRb2cq-++++TI/-Tmp-/tmp5d0d83e6.tmp/HtmlAgilityPack.dll.7.s.opt.bc /var/folders/fI/fIDK1klFH6yDR8NRb2cq-++++TI/-Tmp-/tmp5d0d83e6.tmp/HtmlAgilityPack.dll.7.s.bc
Executing llc: /Developer/MonoTouch/LLVM/bin/llc -mattr=+v6 -asm-verbose=false -mtriple=armv7-darwin -relocation-model=static -unwind-tables -disable-gnu-eh-frame -enable-mono-eh-frame -o /var/folders/fI/fIDK1klFH6yDR8NRb2cq-++++TI/-Tmp-/tmp5d0d83e6.tmp/HtmlAgilityPack.dll.7.s
 /var/folders/fI/fIDK1klFH6yDR8NRb2cq-++++TI/-Tmp-/tmp5d0d83e6.tmp/HtmlAgilityPack.dll.7.s.opt.bc
Code: 9480 Info: 7638 Ex Info: 5889 Unwind Info: 333 Class Info: 2401 PLT: 695 GOT Info: 16390 GOT: 5496 Offsets: 6325
Output file: '/var/folders/fI/fIDK1klFH6yDR8NRb2cq-++++TI/-Tmp-/tmp5d0d83e6.tmp/HtmlAgilityPack.dll.7.s'.
Linking symbol: '_mono_aot_module_HtmlAgilityPack_info'.
Compiled 1357 out of 1366 methods (99%)
Methods compiled with LLVM: 1335 (97%)
Methods without GOT slots: 869 (63%)
Direct calls: 0 (100%)
JIT time: 253 ms, Generation time: 20281 ms, Assembly+Link time: 0 ms.

That will crash at runtime if you depend, even indirectly, on those features.


Now this may work in the simulator because:
(a) linking id disabled (by default);
(b) the JIT compiler is used

IOW as long as you do not hit code that requires System.Net.dll the application will never realize it's missing. Device builds are different since it use the AOT compiler, which requires all code the be available at build time.


I'll fix the MT0000 error but I strongly suggest you to build you own HtmlAgilityPack.dll from source (and enable the linker to get faster device build/deploy times and a much smaller application size). Thanks for the report.
Comment 5 Tom Opgenorth 2012-07-23 14:33:25 UTC
Correct - linking was disabled for testing purposes.

Thanks for the advice.  Curiously, the application is working on devices with the Silverlight 3 assembly of HTML Agility Pack. Or to put another way, we have yet to see any problems with it running on our devices.

I was kind of hoping to use one of the existing assemblies for the HAP. Not surprised that it doesn't work.
Comment 6 Sebastien Pouliot 2012-07-23 14:44:03 UTC
It will work as long as you do not hit a code path that requires the missing types (and maybe it's not possible to hit them in your app). Re-building it is safer and likely easier that testing this ;-)
Comment 7 Sebastien Pouliot 2012-07-24 15:39:40 UTC
Fixed in master: 26d7de8cdd25b537141fd967aa11954186ac6027