9
votes

I'm trying to install Xamarin.Mobile in a PCL iOS project by NuGet and i'm gotting this error!

Could not install package 'xamstore-xamarin.mobile 0.7.1'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

This is my AppDelegate

// The UIApplicationDelegate for the application. This class is responsible for launching the 
// User Interface of the application, as well as listening (and optionally responding) to 
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
    //
    // This method is invoked when the application has loaded and is ready to run. In this 
    // method you should instantiate the window, load the UI into it and then make the window
    // visible.
    //
    // You have 17 seconds to return from this method, or iOS will terminate your application.
    //
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        global::Xamarin.Forms.Forms.Init();
        Xamarin.FormsMaps.Init();
        LoadApplication(new App());

        return base.FinishedLaunching(app, options);
    }
}

My SDK version is 10.1.

Xamarin.Mobile is working fine in Android Project.

Any idea how to fix this ?

3

3 Answers

2
votes

Instead of add the package of Xamarin.Mobile with NuGet, you can try adding Xamarin.Mobile as a component.

Right click the Components folder:

Right click the Components folder

Search and select Xamarin.Mobile on Xamarin Components window:

Search and select Xamarin.Mobile

It might work!

3
votes

Use the Microsoft Resolution of problems.

Clean your Solution and Rebuild again.

3
votes

The Xamarin.Mobile NuGet package is not compatible with a PCL, hence the error. This DLL is meant to be installed into an iOS/Android/Windows app project. There is no cross-platform API for PCL use.

You could use this with a Shared Library instead. Or, you'll need to work in each platform project.