H.Uno.Sdk.Manifest
0.12.0
See the version list below for details.
dotnet add package H.Uno.Sdk.Manifest --version 0.12.0
NuGet\Install-Package H.Uno.Sdk.Manifest -Version 0.12.0
<PackageReference Include="H.Uno.Sdk.Manifest" Version="0.12.0" />
paket add H.Uno.Sdk.Manifest --version 0.12.0
#r "nuget: H.Uno.Sdk.Manifest, 0.12.0"
// Install H.Uno.Sdk.Manifest as a Cake Addin #addin nuget:?package=H.Uno.Sdk.Manifest&version=0.12.0 // Install H.Uno.Sdk.Manifest as a Cake Tool #tool nuget:?package=H.Uno.Sdk.Manifest&version=0.12.0
Uno.Sdk
Easy configuration for Uno projects in 2 lines of code. Now is only there platforms are supported:
- Mobile(macOS, MacCatalyst and Android)
- Windows
- WebAssembly
- Skia.Gkt(
net7.0-gtk
) - Skia.Wpf(
net7.0-windows
) - Skia.Linux.Framebuffer(
net7.0-linux
) - Skia.Tizen(
net7.0-tizen
)(still unsupported)
Usage
Here are three possible uses:
- Use SDK via NuGet. A small hack will be used here to disable the error message about missing workloads for webassembly/linux/gtk.
<Project Sdk="H.Uno.Sdk/0.12.0">
<PropertyGroup>
<TargetFrameworks>net7.0-maccatalyst;net7.0-android;net7.0-ios;net7.0-webassembly;net7.0-gtk;net7.0-linux;net7.0-windows</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
</PropertyGroup>
</Project>
- Use local SDK after installing workload
<Project Sdk="H.Uno.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-maccatalyst;net7.0-android;net7.0-ios;net7.0-webassembly;net7.0-gtk;net7.0-linux;net7.0-windows</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
</PropertyGroup>
</Project>
- Use via
Microsoft.NET.Sdk
and<UseUno>true</UseUno>
after installing the workload (the most correct, but currently not supported due to the fact that WebAssembly requires Microsoft.NET.Sdk.Web which will not work with some target frameworks)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-maccatalyst;net7.0-android;net7.0-ios;net7.0-webassembly;net7.0-gtk;net7.0-linux;net7.0-windows</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<UseUno>true</UseUno>
</PropertyGroup>
</Project>
Fast start
You can use https://github.com/HavenDV/Uno.Sdk.Example/ as a start point or just use templates:
dotnet new install H.Uno.Templates # If you don't have installed workload
mkdir SingleProjectSolution
cd SingleProjectSolution
dotnet new uno
dotnet build
dotnet run --framework net7.0-gtk
Install workload
Although you don't have to do this, full support for the custom target framework requires installing the appropriate workload:
- On Linux / macOS:
curl -sSL https://raw.githubusercontent.com/HavenDV/Uno.Sdk/main/scripts/workload-install.sh | sudo bash
- On Windows:
Invoke-WebRequest 'https://raw.githubusercontent.com/HavenDV/Uno.Sdk/main/scripts/workload-install.ps1' -OutFile 'workload-install.ps1';
./workload-install.ps1
Uninstall
dotnet workload uninstall uno
Settings
The SDK is designed to assign default values only to properties that have not been explicitly set by the user. This way the user has full control over what the SDK does. Settings:
<UseUnoUwp>true</UseUnoUwp>
- will use Uno.UI packages instead of Uno.WinUI.<UnoVersion>5.0.0</UnoVersion
(and other versions, see here) - will change the versions of all implicit PackageReferences
Disclaimer
Although this is a working solution, I have simplified some things regarding workload and manifest, which could theoretically cause problems (for example, when upgrading to a new sdk version).
Docs
Official documentation regarding the design of Workloads and Sdks:
- https://github.com/dotnet/sdk/tree/main/documentation/general/workloads
- https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workloads.md
- https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-resolvers.md
- https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-manifest.md
- https://github.com/dotnet/designs/blob/main/accepted/2021/workloads/workload-installation.md
- MAUI Workload - https://github.com/dotnet/maui/tree/main/src/Workload
- Tizen Workload - https://github.com/Samsung/Tizen.NET/tree/main/workload
- Uno Single Project Targets - https://github.com/unoplatform/uno/blob/master/build/nuget/uno.winui.single-project.targets
Support
Priority place for bugs: https://github.com/HavenDV/Uno.Sdk/issues
Priority place for ideas and general questions: https://github.com/HavenDV/Uno.Sdk/discussions
Discord: https://discord.gg/g8u2t9dKgE
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.27.0 | 223 | 1/31/2024 |
0.26.0 | 322 | 11/27/2023 |
0.25.0 | 220 | 11/25/2023 |
0.24.0 | 245 | 11/23/2023 |
0.23.0 | 242 | 11/19/2023 |
0.22.0 | 178 | 11/15/2023 |
0.21.0 | 166 | 11/15/2023 |
0.20.0 | 193 | 11/3/2023 |
0.19.0 | 205 | 11/3/2023 |
0.18.0 | 271 | 10/11/2023 |
0.17.2 | 283 | 10/7/2023 |
0.17.1 | 231 | 10/7/2023 |
0.17.0 | 249 | 10/7/2023 |
0.16.0 | 236 | 10/7/2023 |
0.15.0 | 182 | 10/6/2023 |
0.14.0 | 274 | 10/6/2023 |
0.13.1 | 231 | 10/5/2023 |
0.13.0 | 272 | 10/5/2023 |
0.12.0 | 219 | 10/5/2023 |
0.11.1 | 240 | 10/5/2023 |
0.11.0 | 236 | 10/5/2023 |
0.10.0 | 237 | 10/3/2023 |
0.9.8 | 296 | 10/2/2023 |
0.9.7 | 213 | 10/2/2023 |
0.9.6 | 296 | 10/2/2023 |
0.9.5 | 245 | 10/2/2023 |
0.9.4 | 217 | 10/2/2023 |
0.9.3 | 222 | 10/2/2023 |
0.9.2 | 247 | 10/1/2023 |
0.9.1 | 268 | 10/1/2023 |
0.9.0 | 256 | 10/1/2023 |
0.8.4 | 244 | 9/30/2023 |
0.8.3 | 273 | 9/30/2023 |
0.8.2 | 241 | 9/29/2023 |
0.8.1 | 251 | 9/29/2023 |
0.8.0 | 215 | 9/29/2023 |