Xamarin Native Dependency reference problems RRS feed

  • Question

  • User229479 posted

    I have a xamarin.native app that has the following layers:

    • Android UI Layer
    • iOS UI Layer
    • Domain Layer
    • Infrastructure Layer
    • IoC Layer

    I'm using simple injector as my IoC and I've noticed that as I start to setup my IoC I get the following build error:

    Can not resolve reference some.reference, referenced by MyMobileApp.IoC > MyMobileApp.Infrastructure.Please add a NuGet package or assembly reference for 'some.reference', or remove the reference to MyMobileApp.IoC`.

    Here is how I'm registering the IoC on the UI layer for Android:

    `[Application] public class App : Application { public static readonly Container Container = new Container();

    public App(IntPtr handle, JniHandleOwnership transfer) : base(handle, transfer)
    public override void OnCreate()
    private static void Initialize()
        // these are static methods from the IoC layer.


    If I add the nuget package I'm using on the infrastructure layer to my UI layers, it resolves the error but that seems wrong to me as I never had to do that with a web or console app, so I'm a little puzzled on what I'm doing wrong.

    the Domain, Infrastructure, and IoC layers are all Netstandards if that makes a difference.

    Friday, December 7, 2018 5:38 PM


  • User229479 posted

    after banging my head on this, I'm just going to succeed and just installed whatever it's complaining about, I'm not finding much resources on things to steer me in the right direction

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, December 10, 2018 3:05 PM