Remove ios, windows8, and wp8 from Xamarin Forms PCL - nuget 3.0 opt-into error?

后端 未结 8 1919
名媛妹妹
名媛妹妹 2020-12-01 13:30

I\'m working on a Xamarin Forms project. I want to target Android and Windows 10 UWP.

When I try to clean up the PCL by removing \"Windows 8\", \"Windows Phone Si

相关标签:
8条回答
  • 2020-12-01 14:20

    None of the above resolved my issue AND uninstalling nuget packages or editing the project file is NOT a solution (at least for me - talk about reference hell) but this method does work:

    First, you cannot remove a single targeted platform such as win8, silverlight or asp.net core without unchecking the .NET Framework too.

    When you uncheck the Windows 8 and ASP.NET Core also uncheck the .NET Framework. Do not fret, it will not present the above error message but VS will automatically recheck the .NET Framework (often a lower version) and then once completed re-add Window 8.1 after removing the others.

    Once that happens, you can then remove the others subsequently. This took me a while to figure out since it is not obvious nor explained anywhere else. You do not need to uninstall Xamarin.Forms.

    0 讨论(0)
  • 2020-12-01 14:23

    If your problem is about those option showing everywhere on solution, you can simple select in solution explorer those that you don't want to show then right-click and click on "Unload Project". They will stay there increasing the project size, but they will leave from deploy list and other places.

    0 讨论(0)
提交回复
热议问题