Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Error: Framework not installed: .NETPortable, Version=v4.5

I installed Xamarin successfully and create a new project. With no code at all I'm getting the following error under the references and get errors that Xamarin.Forms is missing. I tried searching and I'm not seeing this same error where the fixes suggested work. Thank you.

Error:

Framework not installed: .NETPortable, Version=v4.5

System Setup:

Windows 7 (Build 7601: Service Pack 1)

Xamarin Studio 5.1.4 (Build 0)

Visual Studio 11.0.50727.1 RTMREL Ultimate

.NET Framework Version 4.5.50709

Tried to start project from VisualStudio got the following error: enter image description here

So I tried something else by starting as Administrator and this this output:

Adding Xamarin.Forms...
Installing 'Xamarin.Forms 1.0.6186'.
Added file 'Xamarin.Forms.Build.Tasks.dll' to folder 'Xamarin.Forms.1.0.6186\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.targets' to folder 'Xamarin.Forms.1.0.6186\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Core.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Core.xml' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Platform.Android.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Xaml.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Xaml.xml' to folder 'Xamarin.Forms.1.0.6186\lib\MonoAndroid10'.
Added file 'Xamarin.Forms.Core.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Core.xml' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Platform.iOS.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Xaml.dll' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Xaml.xml' to folder 'Xamarin.Forms.1.0.6186\lib\MonoTouch10'.
Added file 'Xamarin.Forms.Core.dll' to folder 'Xamarin.Forms.1.0.6186\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Core.xml' to folder 'Xamarin.Forms.1.0.6186\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Xaml.dll' to folder 'Xamarin.Forms.1.0.6186\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Xaml.xml' to folder 'Xamarin.Forms.1.0.6186\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10'.
Added file 'Xamarin.Forms.Core.dll' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.Core.xml' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.Platform.WP8.dll' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.Xaml.dll' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.Xaml.xml' to folder 'Xamarin.Forms.1.0.6186\lib\WP80'.
Added file 'Xamarin.Forms.1.0.6186.nupkg' to folder 'Xamarin.Forms.1.0.6186'.
Successfully installed 'Xamarin.Forms 1.0.6186'.
Adding 'Xamarin.Forms 1.0.6186' to Test.
Could not install package 'Xamarin.Forms 1.0.6186'. 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.
like image 763
Russ960 Avatar asked Dec 04 '22 06:12

Russ960


2 Answers

If you don't have Visual Studio installed the following steps worked for me:

  1. Download the Portable Tools 2 extension and install it using the /buildmachine switch: PortableLibraryTools.exe /buildmachine

  2. Download Portable Class Libraries v4.6 and install it.

  3. Copy the contents (directories v4.0, v4.5 and v4.6) of C:\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6 into C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable (overwriting any existing files). [Backup the original files if you want to be on the safe side!]

like image 173
Niels R. Avatar answered Jan 15 '23 06:01

Niels R.


That looks like you do not have the Portable Class Libraries installed on your machine.

Xamarin does not currently install the PCLs for you on Windows. Normally they are installed with Visual Studio but they are available as a separate download.

The PCLs are installed in the following directory on Windows:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable

Check if you have that directory. If you do not have this directory you will need to install the Portable Class Library Tools first and then the Portable Class Libraries v4.6.

I suspect you may just be missing the v4.6 PCLs.

Profile78 is included as part of Portable Class Libraries v4.6. If you install that it puts a .zip file into the directory:

C:\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6

You will need to unzip that and extract the contents into the C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable directory.

like image 28
Matt Ward Avatar answered Jan 15 '23 06:01

Matt Ward