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 Silverlight 8", "Windows Phone 8.1", "Xamarin.ios", and "Xamarin.ios (classic)" from the PCL targets, I get the following nasty...
I'm really just trying to remove WP8 as I don't care about targeting it.
The project's targets cannot be changed. The selected targets require the project to opt-into NuGet 3.0 support, however, Visual Studio cannot automatically do this for you. Please uninstall all NuGet packages and try again.
How do you get a project to opt-into NuGet 3.0? Something else I should try?
environ: Xamarin Forms, VS2015
Thanks....
Xamarin. Forms 5.0.0.2291 Prefix Reserved This package has a SemVer 2.0.0 package version: 5.0.0.2291+850-sha.d21728939-azdo.5530461. For projects that support PackageReference, copy this XML node into the project file to reference the package. The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Reinstall the current stable version of Xamarin using from visualstudio.com. In cases where the above steps do not resolve the "package did not load correctly" error, here are a few more steps to try. Create a new Windows user account. Check if the Xamarin Visual Studio extensions load without error for the new user.
Create a new Windows user account. Check if the Xamarin Visual Studio extensions load without error for the new user. If those stored settings do indeed appear to be the problem, you can try backing them up and then deleting them.
In this example Xamarin.Forms.1.3.1.6296 is the old version number that was removed with the NuGet package update.
The solution that worked for me:
Uninstall Xamarin.Forms:
Right Click Solution -> Manage NuGet Packages -> Uninstall Xamarin.Forms -> Restart VS
Then remove build platforms:
Right Click Solution -> Properties -> Build -> under Targeting select Change -> Remove platform(s) -> Restart VS
Reinstall Xamarin.Forms:
Manage NuGet packages -> Search for Xamarin.Forms -> Install -> Restart VS
Another possible solution is to rename packages.config temporarily, change the PCL settings to the new target platforms, and then change the name of packages.config back again. This worked for me on my project using VS 2015. Can't take credit for this solution, read it on a blog some time back and just posting it here in case it helps someone. If I come across the blog article again I'll post the link here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With