Add Xamarin.Forms Package Problems

Asked

Viewed 975 times

1

I’m starting some projects with Xamarin Studio, I’m having some problems and I still can’t solve always appear these 2 errors, I looked at a solution in stackoverflow.com, but the solutions given there did not solve my problem and as I did not find anything like it, I decided to post here.
Right at the beginning of my application, appears

using Xamarin.Forms;

The type or namespace name 'Xamarin' could not be found (are you Missing a using Directive or an Assembly Reference? ) (CS0246)

public class App : Application

The type or namespace name 'Application' could not be found (are you Missing a using Directive or an Assembly Reference? ) (CS0246)

The solution to solve this is routine taken from stackoverflow.com

  1. Select the project in the Solution tab
  2. Select "Project" along the top menu
  3. Select "Add Nuget Packages..."
  4. Do a search for "Xamarin.Forms"
  5. Add "Xamarin.Forms" to that project

The problem with doing this is that it cannot add the Xamarin package, it presents another problem:

Could not install package 'Xamarin.Forms 1.3.3.6323'. You are trying to install this package into a project that targets 'Portable-Profile78', 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.

1 answer

1

First the version of the package you are trying to install is very old, try to install the latest (1.5.0.6447). Another item is to check whether the profile you selected in the project or the framework you are using is compatible:

  • Which version of Xamarin Studio you are running?
  • What version of Xamarin.Android or Xamarin.iOS is this project using?
  • If it is a PCL library, which profile this library is configured to use?

If you’re on Windows, make sure you’ve installed support for Portable Libraries and Visual Studio 2013 or higher (see how to install here - link in English). If you needed to install the support and had already installed Xamarin before, you will need to reinstall the support.

In addition, the referenced package supports only the following platforms: Portable . NET 4.5, Windows Phone Silverlight 8.0, Xamarin.Android, Xamarin.iOS and Xamarin.iOS (Classic); not including support for Silverlight 5.0. You cannot have other platforms or larger versions configured in your project to be able to use this package.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.