I downloaded Xamarin Studio to build my first application, but I'm having some problems which I have not found a solution.
First of all I have created a new solution with the App Xamarin.Forms Blank template. When I have tried to build it, a few errors have appeared (I did not changed a single line from the template):
The type or namespace name 'Xamarin' could not be found (are you mission a using directive or an assembly reference?)
The type or namespace name 'Application' could not be found (are you mission a using directive or an assembly reference?)
Then I supposed that the Xamarin.Forms package was missing, so I clicked on Project > Add NuGet Packages... and I tried to install the Xamarin.Forms package. Here is where I get stuck, because a new error is displayed:
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.
I would appreciate any help, because I have not found any solution.
The error message suggests that you do not have the Portable Class Libraries (PCLs) installed.
If you are on the Mac you can get these installed by installing the Mono Development Kit (MDK).
If you are on Windows the procedure is a bit more tricky. To install the Portable Class Libraries on Windows you have three options:
One problem with 2. is that installing the Portable Library Reference Assemblies 4.6 does not install them into the correct location but instead just installs a PortableReferenceAssemblies.zip file into the directory:
C:\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6
This PortableReferenceAssemblies.zip file contains three directories (4.0, 4.5 and 4.6) which need to be extracted and copied into the PCLs directory:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable
There is more detail in the Installing Portable Class Libraries for Xamarin Studio post but the above should give you an overview of what is required.