Bug 45367 - DllNotFoundException when debugging on remote Mac
Summary: DllNotFoundException when debugging on remote Mac
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-10-13 15:39 UTC by Daniel Jonsson
Modified: 2016-10-14 13:14 UTC (History)
4 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 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 Daniel Jonsson 2016-10-13 15:39:06 UTC

I'm developing on Windows in Visual Studio. My Xamarin project uses the NuGet library UrhoSharp.Forms. When I launch my iOS version of the app on a remote Mac machine, it works fine. However, when I press the button in the app that starts an Urho view it crashes.

The exception it throws in the Output pane is:

    Unhandled Exception:

    System.DllNotFoundException: @rpath/Urho.framework/Urho

However, the statement it crashes on is the following in the iOS project's Main.cs file:

    namespace XamarinTest.iOS
        public class Application
            // This is the main entry point of the application.
            static void Main(string[] args)
                // if you want to use a different Application Delegate class from "AppDelegate"
                // you can specify it here.
                UIApplication.Main(args, null, "AppDelegate");      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Is this supposed to work? UrhoShap.Forms is installed in my Xamarin iOS project. Do I need to do something more?

Comment 1 Ben Beckley 2016-10-13 18:37:39 UTC

Thank you for taking the time to file this issue. Could you please attach the Xamarin logs the next time this occurs? You can do this from "Help > Xamarin > Zip Logs..." Also, if possible, could you please attach a sample project?

Thank you.
Comment 2 Daniel Jonsson 2016-10-14 13:14:43 UTC

Thank you for your reply. I was afraid that the crash was due to something unsupported.

I tested the FormsSample project (https://github.com/xamarin/urho-samples/tree/master/FormsSample/FormsSample.iOS) and noticed that it worked fine. After examining it, I noticed that "Supported architectures" is set to "i386", while in my project it is set to "i386 + x86_64". The row "<MtouchArch>i386</MtouchArch>" in https://github.com/xamarin/urho-samples/blob/master/FormsSample/FormsSample.iOS/FormsSample.iOS.csproj. Changing my architecture to i386 solved it, and my Urho animation works now without crashing abruptly.

However, my iOS project is based on the built-in template. So "<MtouchArch>i386, x86_64</MtouchArch>" was simply the default, and not something I had set.