This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 52 - System.DllNotFoundException
: System.DllNotFoundException
Product: iOS
Classification: Xamarin
Component: General
: 3.x
: Macintosh Mac OS
: --- enhancement
: Untriaged
Assigned To: Bugzilla
  Show dependency treegraph
Reported: 2011-07-22 16:28 EDT by Andrew Young
Modified: 2011-08-04 17:13 EDT (History)
2 users (show)

See Also:

Screenshot of crash in simulator. (103.83 KB, image/png)
2011-07-22 16:28 EDT, Andrew Young

Description Andrew Young 2011-07-22 16:28:22 EDT
Created attachment 11 [details]
Screenshot of crash in simulator.

I'm getting a DllNotFoundException when running my app in the simulator. I
upgraded to OS X Lion, upgraded Xcode 4.1 for Lion and now I'm getting this
exception. I noticed that if I make a copy of the iPhoneSimulator4.3.sdk folder
then rename it to iPhoneSimulator3.2.sdk it will work.

at (wrapper managed-to-native)
at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename,
SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x00040] in
at Mono.Data.Sqlite.SqliteConnection.Open () [0x0021a] in
at (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteConnection:Open
at MyApp.iPhone.Data.Local.SqlConnection.ReaderWithCommand (System.String
commandString, System.Collections.Generic.Dictionary`2 parameters,
System.Action`1 block) [0x0000d] in
at MyApp.iPhone.Data.Local.LocalService.GetHashValueFrom (LocalDictionaries
dictionary, System.String key) [0x0001f] in
at MyApp.iPhone.Data.Gateway.GetDbVersion () [0x00000] in
at MyApp.iPhone.Support.Installation.MigrateDb () [0x00000] in
at MyApp.iPhone.AppDelegate+<FinishedLaunching>c__AnonStorey0.<>m__0 ()
[0x0000b] in /Users/Andrew/Projects/MyApp-iphone/MyApp.iPhone/Main.cs:51 
at MonoTouch.Foundation.NSActionDispatcher.Apply () [0x00000] in
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String
principalClassName, System.String delegateClassName) [0x00038] in
at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in
at MyApp.iPhone.Application.Main (System.String[] args) [0x00000] in
Comment 1 Chris Toshok 2011-07-25 22:51:29 EDT
Interesting.  Is the project configured to be using the 3.2 sdk?  It's in
"$solution options" -> iPhone Build -> SDK version.
Comment 2 Andrew Young 2011-07-26 00:19:14 EDT
No. It is set to Default. The only other option in that field is 4.3.
Comment 3 Chris Toshok 2011-07-26 12:16:57 EDT
Ahh, found the issue.  I'll get a fix in git soon.
Comment 4 Andrew Young 2011-07-27 13:00:44 EDT
Awesome. Thanks. As a short term work around, renaming the folder should be ok

(In reply to comment #3)
> Ahh, found the issue.  I'll get a fix in git soon.
Comment 5 Chris Toshok 2011-07-27 22:02:33 EDT
Yeah, in a way that's essentially what the fix is, except wr arrive at it by
using the 4.3 directory while you rename 4.3 to 3.2.
Comment 6 Chris Toshok 2011-08-04 17:11:11 EDT
Sorry about not giving you more feedback - the fix is in git (as of July 26)
and will go out with the next release of monotouch.
Comment 7 Andrew Young 2011-08-04 17:13:38 EDT
Thanks. Any timeline on when the next release will be? There's a few bug fixes,
including this one, that we're waiting on in the next release.

Note You need to log in before you can comment on or make changes to this bug.