Could not install package 'Xamarin.Forms 1.0.6186' (Windows)

I installed Xamarin from the installer on the homepage onto a Windows 7 Pro with SP1 (32-bit) PC on 12/06/2014. The t-shirt sample app builds and runs as expected.

I want to create my own app from scratch, so I am following the instructions here:
http://developer.xamarin.com/guides/cross-platform/xamarin-forms/introduction-to-xamarin-forms/

I created a new 'Blank App (Xamarin.Forms Portable)' solution in Xamarin Studio. As soon as it opens I get 'Could not add packages. Please see Package Console for deails.' in the top status bar, and the following in the 'Package Console' panel:

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 XamarinFormsPoc.
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.

When I build I get the errors in the attached screenshot. Bear in mind I haven't modified anything yet - this is a fresh solution.

These two forum posts have the same problem, but for Mac OS X not Windows 7:

I have tried the following things:

  1. Closing and re-opening the solution, as suggested by JasonASmith in one of those posts.
  2. Reboot.
  3. Installed Mono. The solution for the two posts above seems to have been to install the Mono MDK from http://www.go-mono.com/mono-downloads/download.html. That page only lists a general Mono installer for Windows, not an MDK. There is no mention anywhere I can find on the web of a Mono MDK for Windows, so I ran the full installer hoping it would include the necessary pieces. I recreated the solution as above, but still the same issue.
  4. Verified I have Microsoft .NET Farmework 4.5 installed (I ran it's installer and it said it was already installed).

I've attached the text from the Xamarin Studio > Help > About > Show Details dialog.

Anyone have any ideas on what I need to do to get this running please?

Thanks
Seb

Posts

  • SebdeRaadtSebdeRaadt NZMember

    Attached is the broken solution.

  • mattwardmattward GBMember Xamurai

    Looking at the error message it looks like the .NET Portable Class Llibraries (PCLs) are not installed on your Windows machine.

    To get the PCLs installed without installing Visual Studio you can install Portable Tools 2 and Portable Library Reference Assemblies v4.6. The PCL Reference Assemblies v4.6 include the Profile78 which you are using. There is a discussion on the forum about the steps required.

    The Portable Tools 2 can be installed with the /buildmachine option if you do not have Visual Studio installed.

    You will also need to do a bit of manual copying of files since the Portable Libraries Reference Assemblies v4.6 only installs a zip file, which will need extracting and the contents copied to the correct location.

    After the PCL profiles are installed you will need to reinstall Xamarin Android so the PCL profiles are updated and marked as compatible with the MonoAndroid framework.

  • SebdeRaadtSebdeRaadt NZMember

    Thanks Matt

    I have VS versions 2008, 2010 and 2012 installed, but am using Xamarin Studio for mobile development. C:\Program Files\Reference Assemblies\Microsoft\Framework.NETPortable already had some of the profiles, but the files were older than in that PLRA download, so I replaced them.

    Since I used the unified installer, and I couldn't find any download for just the Xamarin.Android installer, I uninstalled all three Xamarin entries in Add/Remove Programs, and reinstalled using the unified installer, with reboots between them.

    Progress has been made as the first two build errors in the screenshot above are gone, only the last two remain. I decided to try recreating the solution, but to my surprise, I have no 'Mobile Apps' folder under 'C#' in the New Solution window. See attachment.

    Any ideas why the unified installer didn't install this when I re-installed please?

  • CraigDunnCraigDunn USXamarin Team Xamurai

    @SebdeRaadt‌ I think that must be an error on the webpage (or the "Mobile Apps" section got renamed)

    In your screenshot, the Forms section is showing, as well as the Xamarin.Forms PCL and Shared solution options. These are the templates you should use to create a Xamarin.Forms app.

  • SebdeRaadtSebdeRaadt NZMember

    Thanks Craig, must have changed in the last few days. All seems to work now.

  • I have this problem (
    Baseline:

    1. Windows 8 (x64), Visual Studio 2012 U2.
    2. It looks that Portable Class Libraries is installed (I can create this type of project in VS 2012), and I installed Portable Class Libraries v4.6. (the directory C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.5\Profile\Profile78 has content)
    3. The type of VS project is Blank App (Xamarin.Forms Portable)

    Well, so far, I have't installed WinPhone SDK, and it can be my problem resolution, but I'm not sure. It seems as independent conponents: Xamarin.Forms and Win SDK. My VS 2012 can't to install Xamarin.Forms.1.0.6186.nupkg, and I still can't understand why. I'm installing Win SDK now. One hopes, it will help.

    Any suggestion?

  • And if i try to install Xamarin.Forms from VS 2012U2 NuGet packs manager I have next problem (see attachment)
    Is it problem due to lack of WinPhone SDK on my machine?

  • mattwardmattward GBMember Xamurai

    Looking at the right hand side of that dialog it looks like you are missing the MonoAndroid PCL profiles. The Xamarin.GooglePlayServices NuGet package should show MonoAndroid, Version=v1.0 above it. In your dialog it is showing Unsupported, Version=v1.0.

    I would try reinstalling Xamarin.Android which should update the PCL profiles on your machine with the Xamarin profile information. If you installed the PCLs after installing Xamarin the profiles would not be updated since they did not originally exist.

  • Matt Ward, thanks for attention, but I' done it: reinsall...
    Now I have next base conditions:

    1. At the begining I had Windows 8 (x64) and Win 8.1 (x64) with VStudio 2012 U2 already installed. I used two machines.
    2. Needed components were installed in next order:
      a) gtk-sharp-2.12.25.msi
      b) NetFx_PortableLibraryReferenceAssemblies46.exe
      c) PortableLibraryTools2 for Visual Studio 2010' (with /buildmachine)
      d) Windows phone SDK 8.0
      After d) there where 4.0, 4.5, 4.6 directories created with last supported profiles 158, 78, 44 respectively (every profile directory is full with libs, directories, etc..).
    3. After all 2. components were installed, I reinstalled Xam.Android.sdk, Xam.ios sdk, vs2012 (and 2012) plugins, etc with Xamarin.VisualStudio_Setup-3.3.47.msi

    Now we are trying to create Blank App (Xamarin.Forms Portable) project in VS2012. and over and over again we are getting an error in attachment. We cant't understand what our mistakes are in installation process :(
    In attachnemt I send all issues of creating Blank App (Xamarin.Forms Portable) project

  • TarasKolomietsTarasKolomiets USMember
    edited August 2014

    Where can I check what profiles available for Xamarin inside Visual Studio?
    Well, I,ve found one feature. With Android SDK Manager I installed only Api levels 17-19.
    And when I tried to create simple Adroid Project with VS, I found, than the smallest API level version for this project is 7 with mono 2.1 support.
    I am now installing API level 3,4 (the smallest versions), may be it is resolution...
    I don't know. Xamarin Stutio let me create Blank App (Xamarin.Forms Portable) project (well, only with android component and without ios, but share part of project is created correct with profile 78, with references to xamarin.forms libs.. ), but VS with the same profile cant't work... pfff..... :(

  • TarasKolomietsTarasKolomiets USMember
    edited August 2014

    hhhhmmmmmmmmmm....
    Well, I seem to have solved this problem..
    As I said earlier, even after all components were installed in right order I could't create Blank App (Xamarin.Forms Portable) project, due to errors in attachment showed previously. Well, I can't clear create it still :) I get the same errors. But now, if I open NuGet PackManager and select Xamarin Extension Package path, created before from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Xamarin\Xamarin\3.3.47.0\Packages. I see the picture from attachment. It shows, that Xamarin Forms library now installed. And in App1 (shared part of Blank App (Xamarin.Forms Portable) project) inside .Net Portable subset in References now Xamarin.Forms. libs are included (at the botom of list)...
    But... App.cs (shared part), MainActivity.cs (android part) and other .cs from IOS and WinPhone parts reflect error:
    all "using Xamarin.Forms" directives are red-underlined as needed libs not included in all projects.. Well, it's true - they aren't included, although they are exist in project directory in packages\Xamarin.Forms.1.0.6186\lib... subdirectories :)
    And I must include all .dll files in every project of solution by hand, respectively every project (from MonoAndroid10 to App1.Android, from portable-win+net45+wp80+MonoAndroid10+MonoTouch10 to App1 and so on)
    It is still not enough. In MonoAndroid10 directory for VS project needed Xamarin.Android.Support.v4.dll originally is missing. But respective project requires it for correct compile. I get it from Blank App (Xamarin.Forms Portable) porject , created with Xamarin Studio :)
    All seem correct.. Wow.. I encounter with last mistake: compilation with Xamarin.Android.Support.v4.dll lib requires
    C:\Users\UserName\AppData\Local\Xamarin\Android.Support.v4\19.0.1\support_r19.0.1.zip archive, but it was corrupted, and VS noticed me about it :).. I tried to unzip it, and could't do it - it was really corrupted. Well, VS besides error notice gave me a full path to download correct package: https://dl-ssl.google.com/android/repository/support_r19.0.1.zip
    I got support_r19.0.1.zip, put in in C:\Users\UserName\AppData\Local\Xamarin\Android.Support.v4\19.0.1\ and tried to recompile all solution.. Vvoila, it worked! The solution Blank App (Xamarin.Forms Portable) was compiled. I set Android project as startable and run it with android emulator (api level 19)
    Now next problems remain:
    1) I must still do any work with my hand to create Blank App (Xamarin.Forms Portable)
    2) I cant't update Xamatin.Forms package through NuGet:

    PM> Install-Package Xamarin.Forms
    Successfully installed 'Xamarin.Forms 1.2.2.6243'.
    Successfully uninstalled 'Xamarin.Forms 1.2.2.6243'.
    Install failed. Rolling back...
    Install-Package : Could not install package 'Xamarin.Forms 1.2.2.6243'. You are trying to inst
    all this package into a project that targets 'portable-win+net45+wp80+MonoAndroid10+MonoTouch1
    0', but the package does not contain any assembly references or content files that are compati
    ble with that framework. For more information, contact the package author.
    At line:1 char:1

    • Install-Package Xamarin.Forms
    • ~~~~~~~~~
      • CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
      • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.Install
        PackageCommand

    Research to be continued :)

    1.jpg 125.5K
  • TarasKolomietsTarasKolomiets USMember
    edited August 2014

    P.S.
    Brief comment to Xamarin.Android.Support.v4.dll
    It seems ugly to get this lib for VS project from XS project. We can find in directly in VS project subdirectory packages\Xamarin.Android.Support.v4.19.0.2\lib\MonoAndroid10

  • Well..
    Now Nuget package manager let me install last versions Xamarin.Forms. Of cource, after new Blank App (Xamarin.Forms Portable) project creation default old Xamarin.Forms package should be removed manually through Nuget PM.
    And it is interesting, that VS let me add Xamarin.Forms for whole solution, but not for dedicated project (framework error still remains for this case). But even for whole solution problem with Xamarin.Android.Support.v4 package still remains.
    I should get new lib from XS project, updated to 20.0.0.3 version .. XS updates all packages without mistakes.
    But it is trouble for VS Nuget )

    Successfully installed 'Xamarin.Android.Support.v4 20.0.0.3'.
    Successfully uninstalled 'Xamarin.Android.Support.v4 20.0.0.3'.
    Install failed. Rolling back...
    Could not install package 'Xamarin.Android.Support.v4 20.0.0.3'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v4.4', 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.

  • mattwardmattward GBMember Xamurai

    It looks like the PCL profiles now have the Xamarin profiles added. The error messages now show MonoAndroid and MonoTouch for the portable project target framework:

    You are trying to inst all this package into a project that targets 'portable-win+net45+wp80+MonoAndroid10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework
    

    With NuGet failing to install Xamarin.Forms into the above portable project even though the NuGet package has a 'portable-win+net45+wp80+MonoAndroid10+MonoTouch10' directory I would guess that maybe you have an old version of NuGet installed. Support for the Mono frameworks were added to NuGet in 2.7.2 so you would need at least that version installed. I would try to install the latest version of NuGet, if you have not already, to see if that makes any difference.

  • ZimkhithaZimkhitha USMember

    Hi All
    I need help, I am creating a solution on xamarin visual studio, I created a new 'Blank App (Xamarin.Forms Portable)'. As soon as it opens I get "Could not add all required packages to the project. The following packages failed to install from C:\program files\xamarin\xamarin\3.3.47.0\packages' xamarin.Forms 1.0.6.186: could not install package Xamarin.Forms 1.0.6.186. it says I'm trying to install the package into a project that targets'.NETPortable,version=4.5,Profile= profile78',but the package does not contain any assembly references that are compatible with the framework."
    As I am a beginner I struggle to find where the problem is, Can you please let me know what do I have to do to achieve this problem.

    Thanks in advance

  • mattwardmattward GBMember Xamurai
    edited August 2014

    It does not look like you have the Portable Class Libraries (PCLs) installed for profile 78. There is a forum post with instructions on what you need to how to install the PCLs on Windows. There is also some information above in this thread.

  • LeeMobileLeeMobile GBMember ✭✭

    Hi All,

    I am seeing this same issue. This is on Windows 7 professional and using Xamarin studiov 5.5.3 build6.

    I do not have Visual studio installed and I have followed these steps from another thread to try and resolve the issue.

    I have done the following

    Installed Portable Library Tools 2
    Installed Portable Library Reference Assemblies 4.6
    Extracted the Portable Library Reference Assemblies 4.6 PortableReferenceAssemblies.zip (from C:\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6\PortableReferenceAssemblies.zip) into the PCL reference assemblies directory C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable.

    Then, of course, reinstalled Xamarin.

    Yet when I create an app or try and add the Xamarin package to the app I see
    Adding Xamarin.Forms...
    Adding 'Xamarin.Forms 1.0.6186' to Test13.

    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.

    Can any one tell me what else to check?

    Thanks

    Lee

  • mattwardmattward GBMember Xamurai
    edited November 2014

    The error message "You are trying to install this package into a project that targets 'portable-Profile78'" from NuGet typically means that the Portable Class Library (PCL) profiles are not available. NuGet will expand Profile78 into a list of shortened framework names in the error message if it is finding the PCL profiles.

    Now that being said it looks like you tried to install them.

    I would check the following directory exists:

    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile78\SupportedFrameworks
    

    Inside the above directory there should be a set of .xml files.

    I also have a simple console app that uses the same NuGet logic to find the Portable Class Libraries. You can compile that and run:

    MonoPcl.exe list
    

    Which will give you the list of PCLs that NuGet can find on your machine.

  • CarstenHansen.5034CarstenHansen.5034 DKMember
    edited December 2015

    EDIT: I installed Microsoft visual studio, restarted(as asked to do) and it seems to work. I'll get back on that. :)

    Same problem here. Odd they don't fix it. I get this message "Could not install package 'Xamarin.Forms 1.3.5.6335'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5,Profile=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."

    Any ideas?

  • mattwardmattward GBMember Xamurai

    @CarstenHansen.5034 - The error message looks like you are using Visual Studio 2015. The previous forum posts are about Visual Studio 2013. VS 2015 does not use the PCL profile xml files to determine if a NuGet package is compatible, instead it has the profile information hard coded, so I am not sure why you are seeing that error. Xamarin.Forms 1.3.5.6336 supports PCL profile 78 and should work with VS 2015.

Sign In or Register to comment.