H.Uno.Sdk.Manifest 0.27.0

dotnet add package H.Uno.Sdk.Manifest --version 0.27.0
                    
NuGet\Install-Package H.Uno.Sdk.Manifest -Version 0.27.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="H.Uno.Sdk.Manifest" Version="0.27.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="H.Uno.Sdk.Manifest" Version="0.27.0" />
                    
Directory.Packages.props
<PackageReference Include="H.Uno.Sdk.Manifest" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add H.Uno.Sdk.Manifest --version 0.27.0
                    
#r "nuget: H.Uno.Sdk.Manifest, 0.27.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=H.Uno.Sdk.Manifest&version=0.27.0
                    
Install H.Uno.Sdk.Manifest as a Cake Addin
#tool nuget:?package=H.Uno.Sdk.Manifest&version=0.27.0
                    
Install H.Uno.Sdk.Manifest as a Cake Tool

Uno.Sdk

Nuget package dotnet License: MIT Discord

Single project solution for Uno. Supported platforms:

  • Mobile(iOS, macOS, MacCatalyst and Android)(net8.0-maccatalyst;net8.0-android;net8.0-ios;net8.0-macos)
  • Windows(net8.0-windows10.0.19041.0 or any other net8.0-windows10)
  • WebAssembly(net8.0-webassembly)
  • Skia.Gkt(net8.0-gtk)
  • Skia.Wpf(net8.0-windows)(this is an implicit indication for net8.0-windows7)
  • Skia.Linux.Framebuffer(net8.0-linux)
  • Skia.Tizen(net8.0-tizen)(Untested)

Project Structure like MAUI:

  • Platforms
    • Android
    • iOS
    • MacСatalyst
    • Windows
    • Gtk
    • Linux
    • Wpf
    • WebAssembly
  • Resources
    • Images
    • Icons
    • Splash
    • Strings
  • UnoProgram.cs
  • App.xaml
  • App.xaml.cs

Usage

Here are three possible uses:

  • Use local SDK after installing workload (Recommended)
<Project Sdk="H.Uno.Sdk">

    <PropertyGroup>
        <TargetFrameworks>net8.0-maccatalyst;net8.0-android;net8.0-ios;net8.0-webassembly;net8.0-gtk;net8.0-linux;net8.0-windows</TargetFrameworks>
        <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
    </PropertyGroup>

</Project>
  • Use SDK via NuGet. A small hack will be used here to disable the error message about missing workloads for webassembly/linux/gtk. But it's better if you install workload also.
<Project Sdk="H.Uno.Sdk/0.27.0">

    <PropertyGroup>
        <TargetFrameworks>net8.0-maccatalyst;net8.0-android;net8.0-ios;net8.0-webassembly;net8.0-gtk;net8.0-linux;net8.0-windows</TargetFrameworks>
        <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
    </PropertyGroup>

</Project>

Note: For some cases to restore correctly from NuGet you need to run this in a project where net8.0-webassembly;net8.0-gtk;net8.0-linux is missing

  • 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>net8.0-maccatalyst;net8.0-android;net8.0-ios;net8.0-webassembly;net8.0-gtk;net8.0-linux;net8.0-windows</TargetFrameworks>
        <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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 net8.0-gtk

Install workload

Although you don't have to do this for NuGet way, full support for the custom target frameworks 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:

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

Cons

  • Allows you to use [UnsupportedOSPlatform("gtk") attributes, which will replace the custom generator and custom attributes for unsupported methods
There are no supported framework assets in this package.

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 253 1/31/2024
0.26.0 335 11/27/2023
0.25.0 235 11/25/2023
0.24.0 260 11/23/2023
0.23.0 256 11/19/2023
0.22.0 191 11/15/2023
0.21.0 180 11/15/2023
0.20.0 209 11/3/2023
0.19.0 220 11/3/2023
0.18.0 284 10/11/2023
0.17.2 298 10/7/2023
0.17.1 244 10/7/2023
0.17.0 262 10/7/2023
0.16.0 253 10/7/2023
0.15.0 196 10/6/2023
0.14.0 287 10/6/2023
0.13.1 244 10/5/2023
0.13.0 287 10/5/2023
0.12.0 233 10/5/2023
0.11.1 257 10/5/2023
0.11.0 253 10/5/2023
0.10.0 251 10/3/2023
0.9.8 313 10/2/2023
0.9.7 228 10/2/2023
0.9.6 309 10/2/2023
0.9.5 261 10/2/2023
0.9.4 229 10/2/2023
0.9.3 238 10/2/2023
0.9.2 262 10/1/2023
0.9.1 284 10/1/2023
0.9.0 269 10/1/2023
0.8.4 261 9/30/2023
0.8.3 287 9/30/2023
0.8.2 255 9/29/2023
0.8.1 263 9/29/2023
0.8.0 229 9/29/2023