Xamarin Forms UWP. Nuget Package Downgrade whilst building

Matthew Robb 21 Reputation points
2021-01-27T10:20:07.273+00:00

I am creating A UWP version of a Xamarin App from a previously successfully deployed XF Android version of the App (Simple? It seems not!) and I seem to be stuck in an interminable loop of updates and errors which I cannot resolve.

Before the detail please be aware that I have cleared the Nuget cache numerous times! Also please note I have realised this issue happens even with a brand new project without a single line of new code in it!

The issue I have is that when I start even a new blank App (for Android, IOS and UWP). I get the UWP warning detected package downgrade from 4.8.0.1534 to 4.8.0.1451. So I employ XF 4.8.0.1451. from the outset. Sadly that then gives me the warning Xamarin Forms recommends TargetPlatformMin >= 10.0.14393.0. (current target is -1). I tried entering these values in the xml file where they said the error was but that didn't seem to change anything. Where do you change the Windows targets?

So I search for a solution and find one: 'update XF to a later version'. I do that and, yes you have guessed, I have my original issue that when I build for UWP I get advised that UWP has had a package downgrade to 4.8.0.1451.

Out of interest when I create a new Xamarin Forms Project (VS 2019) it does not employ XF 5.0.1931. If I install it You won't be surprised to know that the build downgrades the package to XF 4.8.0.1451 and if I employ that I get the warning Xamarin Forms recommends TargetPlatformMin >= 10.0.14393.0. (current target is -1). again.

I really need advise here please as a client has asked for a ump version of my currently successful Xamarin Forms Android App.

Thanks for any suggestions.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,301 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,459 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JarvanZhang 23,951 Reputation points
    2021-01-27T11:37:58.273+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    I get the UWP warning detected package downgrade from 4.8.0.1534 to 4.8.0.1451.

    @Matthew Robb Did you face the error like below? This is a NuGet error. the shared project and the platform project may reference the Xamarin.Forms NuGet package of a different version.
    Warning NU1605 Detected package downgrade: Xamarin.Forms from 5.0.0.1931 to 4.8.0.1451. Reference the package directly from the project to select a different version.

    Please make sure the Xamarin.Forms pakcage of the UWP platform has also been updated to the lastest version.

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.