Xamarin.Forms in Xamarin Studio
I downloaded Xamarin Studio to create my first app, but I have some problems that I didn't find.
First of all, I created a new solution with the Xamarin.Forms Blank App template . When I tried to build it, several errors showed up (I didn't change any lines 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 assumed the Xamarin.Forms package was missing, so I clicked on Project> Add NuGet Packages ... and I tried to install the Xamarin.Forms package. This 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 haven't found any solution.
source to share
The error message suggests that you do not have Portable Class Libraries (PCLs).
If you are on a Mac, you can install them by installing the Mono Development Kit (MDK) .
If you're on Windows, the procedure is a little more complicated. To install Portable Class Libraries on Windows, you have three options:
- Install Visual Studio 2013 (full or express). Update 2 or higher required.
- Install Portable Library Tools and Portable Library Links 4.6 .
- Install Portable Library Tools and copy the .NETPortable directory from Mono to Windows.
One problem with 2. is that installing the Portable Library Reference Assemblies 4.6 doesn't install them in the correct location, but instead just installs the 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) to be extracted and copied to the PCL directory:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable
See Installing Portable Class Classes for Xamarin Studio for more details , but the above should give you an overview of what is required.
source to share