Skip to content

Commit

Permalink
Merge pull request #17655 from unoplatform/dev/jela/uno-sdk-update
Browse files Browse the repository at this point in the history
docs: Update uno.sdk steps
  • Loading branch information
jeromelaban authored Jul 23, 2024
2 parents e2422f6 + c10cec7 commit 44f6dcc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

## Pixel-Perfect. Multi-Platform. C# & Windows XAML. Today.

[![NuGet](https://img.shields.io/nuget/v/uno.sdk.svg)](https://www.nuget.org/packages/uno.sdk/)
[![Open Uno in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/unoplatform/uno)
[![Azure DevOps](https://img.shields.io/azure-devops/build/uno-platform/1dd81cbd-cb35-41de-a570-b0df3571a196/5/master?label=master)](https://uno-platform.visualstudio.com/Uno%20Platform/_build?definitionId=5)
[![Twitter Followers](https://img.shields.io/twitter/follow/unoplatform?label=follow%20%40unoplatform&style=flat)](https://twitter.com/unoplatform)
[![GitHub Stars](https://img.shields.io/github/stars/unoplatform/uno?label=github%20stars)](https://github.com/unoplatform/uno/stargazers/)
[![NuGet Downloads](https://img.shields.io/nuget/dt/uno.ui.svg)](https://www.nuget.org/packages/uno.ui)
[![NuGet Downloads](https://img.shields.io/nuget/dt/uno.winui.svg)](https://www.nuget.org/packages/uno.winui)
[![All Contributors](https://img.shields.io/github/contributors/unoplatform/uno.svg)](https://GitHub.com/unoplatform/uno/graphs/contributors)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/unoplatform/uno/blob/master/CONTRIBUTING.md)

Expand Down
33 changes: 7 additions & 26 deletions doc/articles/upgrading-nuget-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,26 @@ 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](https://www.nuget.org/packages/uno.sdk), upgrading NuGet packages starting with `Uno.WinUI.` requires updating the `global.json` file at the root of your solution.
The latest version of the Uno.Sdk is [![NuGet](https://img.shields.io/nuget/v/uno.sdk.svg)](https://www.nuget.org/packages/uno.sdk/).

It typically looks similar to this:
To upgrade the Uno.Sdk, you'll need to open the `global.json` file located at the root of the solution, which typically looks like this:

```json
{
"msbuild-sdks": {
"Uno.Sdk": "5.1.0",
"Microsoft.Build.NoTargets": "3.7.56"
"Uno.Sdk": "xx.yy.zz",
}
}
```

Update the `xx.yy.zz` property to the latest Uno.Sdk version, then save the file.

> [!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.
> In Visual Studio 2022, once the Uno Version is updated, a banner will ask to restart the IDE. Once the solution is reopened the changes will 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](https://github.com/NuGet/Home/issues/13127).
To find the version to update to, pick the latest stable build from the [Uno.WinUI](https://www.nuget.org/packages/Uno.WinUI) package with either:

- When using Visual Studio 2022, use the NuGet Package Manager
- Use [`dotnet outdated`](https://github.com/dotnet-outdated/dotnet-outdated):
- Install the tool using:

```dotnetcli
dotnet tool install --global dotnet-outdated-tool
```
- Then, at the root of the solution, run the tool with:
```dotnetcli
dotnet outdated
```
- When available, the tool will provide the versions which can be updated.
- [Uno.WinUI in Nuget Package Explorer](https://nuget.info/packages/Uno.WinUI)
- [Uno.WinUI in nuget.org](https://www.nuget.org/packages/Uno.WinUI)
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.
You can also browse the available versions of the Uno.Sdk using [Nuget Package Explorer](https://nuget.info).

## Projects without the Uno.Sdk

Expand Down

0 comments on commit 44f6dcc

Please sign in to comment.