How to upgrade Uno Platform NuGet Packages

Upgrading packages in your applications is done differently, depending on how your solution has been created.

  • If your Uno Platform .csproj files start with <Project Sdk="Uno.Sdk", you are using the Uno.Sdk structure introduced in Uno Platform 5.1.
  • If not, you are using the original project structure provided before Uno Platform 5.1.

Choose one of the sections below depending on your situation.

Projects using the Uno.Sdk

Starting from Uno Platform 5.1 and using the new Uno.Sdk, upgrading NuGet packages starting with Uno.WinUI. requires updating the global.json file at the root of your solution.

It typically looks similar to this:

{
  "msbuild-sdks": {
    "Uno.Sdk": "5.1.0",
    "Microsoft.Build.NoTargets": "3.7.56"
  }
}
Important

In Visual Studio 2022, once the Uno Version is updated, you'll need to close and reopen the solution or restart Visual Studio for the change to take effect.

At this time, the NuGet package Manager does not parse or manage Sdks provided by NuGet. If you would like to see this feature added, please be sure to provide your feedback or upvote this issue.

To find the version to update to, pick the latest stable build from the Uno.WinUI package with either:

Once the version has been chosen, change the global.json line with "Uno.Sdk" to use the newer version of Uno Platform. If you're running Visual Studio 2022, make sure to close/reopen the solution or restart the IDE.

Projects without the Uno.Sdk

To upgrade NuGet packages without the Uno.Sdk, you can use the Nuget Package Manager coming from Visual Studio. Choose the latest stable versions of Uno Platform's NuGet packages.