Xamarin.Forms could not install package

后端 未结 6 1950
伪装坚强ぢ
伪装坚强ぢ 2021-01-07 23:18

When creating a new solution within Xamarian studio I get this error

Could not install package \'Xamarin.Forms 1.0.6186\'. You are trying to install t

相关标签:
6条回答
  • 2021-01-07 23:53

    If you are using Xamarin Studio for Windows (without also having Visual Studio installed) you need to download the Portable Library Tools. See the Xamarin doc Introduction to Portable Class Libraries.

    0 讨论(0)
  • 2021-01-07 23:55

    I had similar issue using VS and I found solution here - http://forums.xamarin.com/discussion/29674/xamarin-forms-dll-cannot-be-installed

    "It looks like your NuGet Package Manager needs to be upgraded. The Xamarin PCL Profiles are installed but NuGet is not recognising Xamarin.iOS as a target framework. You can update NuGet by selecting Tools - Extensions and Updates, then select the Updates tab, then select Visual Studio Gallery. Then update NuGet from there."

    0 讨论(0)
  • 2021-01-08 00:02

    I have invested a lot of time trying all the solutions posted here, but none of them helped me... Here is the solution that worked for me (on Windows 10):

    1.) Open your .csproj file

    2.) Find the TargetFrameworkProfile entry

    3.) This entry contains Profile78 for me, therefore I open the folder below

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

    4.a) If the folder does not exist, then use one of the solutions posted here to install the PLC right on your PC

    4.b) Unfortunately, ASP.NET and Xamarin don't like each other, therefore delete all ASP profiles from this folder. For me it was ASP.NET Core 5.0.xml. Obviously this will break your ASP.NET support in VS

    5.) Restart Xamarin and have fun!

    interesting reading about all that: https://forums.xamarin.com/discussion/52846/cannot-create-new-xamarin-forms-project-pcl-in-xamarin-studio-win10-vs2015

    0 讨论(0)
  • 2021-01-08 00:14

    I had the same problem with my Xamarin project. The problem was, that in the portable Xamarin project Windows Phone Silverlight was set as target. The PCL project from which I created the nuget, didn't reference Silverlight as target. I don't need Silverlight, so uninstalling all nuget packages from my portable Xamarin project, removing silverlight as target and reinstalling the NuGet packages solved it.

    0 讨论(0)
  • 2021-01-08 00:15

    You have created the wrong project type, you created a normal Windows app, and I assume you are targeting iOS/Android or Mac.

    Create the project with the correct type and it should work correctly.

    0 讨论(0)
  • 2021-01-08 00:18

    I had a similar issue using Visual Studio and I've found that the following combination in the PCL works:

    • .NET Framework 4.5
    • Windows Phone Silverlight 8
    • Xamarin.Android
    • Xamarin.iOS
    0 讨论(0)
提交回复
热议问题