Uno.Dsp.Tasks 1.4.0

Prefix Reserved
dotnet add package Uno.Dsp.Tasks --version 1.4.0
                    
NuGet\Install-Package Uno.Dsp.Tasks -Version 1.4.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="Uno.Dsp.Tasks" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Uno.Dsp.Tasks" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Uno.Dsp.Tasks" />
                    
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 Uno.Dsp.Tasks --version 1.4.0
                    
#r "nuget: Uno.Dsp.Tasks, 1.4.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.
#:package Uno.Dsp.Tasks@1.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Uno.Dsp.Tasks&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Uno.Dsp.Tasks&version=1.4.0
                    
Install as a Cake Tool

Uno DSP Tooling - MSBuild Tasks

This is the package that contains the MSBuild tasks to automate the generation of the color overrides file in projects using Uno.

This is used to generate the Color Overrides file for projects with DSP Tooling like documented in the official documentation.

⚠️ Uno.Sdk

If you are using Uno.Sdk project style, you don't need to add the reference to the Uno.Dsp.Tasks package. See below for more information on its usage.


How to get your Theme File

Theme files are used to define the color palette of a theme and can be generated using the Material V3 Theme Builder web site. Simply export using the "Material Theme (JSON)" format and download the generated json file.

Configuration

  1. You need to add reference to the Uno.Dsp.Tasks package in the project where you want the color overrides file to be generated.

    [-- MyProject.Shared\MyProject.Shared.csproj --]
    <ItemGroup>
        [-- You'll need to replace the version for the proper one --]
        <PackageReference Include="Uno.Dsp.Tasks" Version="[version]" />
    </ItemGroup>
    
  2. Place your JSON theme file close to where you want the color overrides file to be generated. This is usually in the Styles folder on the shared project.

    ex: MyProject.Shared\Styles\MyTheme.json

  3. You need to add the following PropertyGroupto your project file:

    [-- MyProject.Shared\MyProject.Shared.csproj --]
    <PropertyGroup>
       <UnoDspImportColors Include="*.json" Generator="Xaml" />
    </PropertyGroup>
    
  4. Compile and you should get a new file named MyTheme.xaml in the same folder as your theme file.

  5. Reference this file in your App.xaml file, following the Uno Themes documentation:

    [-- App.xaml --]
    <Application.Resources>
       <MaterialColors xmlns="using:Uno.Material"
                       OverrideSource="ms-appx:///Styles/MyTheme.xaml" />
    </Application.Resources>
    

Another tool - CLI

Another tool exists, called Uno.Dsp.Cli to generate the output file from the command line. It is less integrated than this MSBuild task, but it can be used to generate the color overrides file from a theme file that is not in your project or if you need more flexibility at the moment when it is generated.


Uno.Sdk

If you are using the Single Project Uno.Sdk package style, you don't need to add the reference to the Uno.Dsp.Tasks package, as it is already included in the Uno.Sdk package.

To activate the Uno.Dsp.Tasks package in your project, you need to add the Dsp; item in the <UnoFeatures> property in your project file, as described here.

You can also change the version of the package by using the <UnoDspTasksVersion> property in your csproj file.

To use it, simply add your theme file in the Styles folder and the overrides file should get generated automatically.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Uno.Dsp.Tasks:

Repository Stars
unoplatform/Uno.Samples
A collection of code samples for the Uno Platform
lindexi/lindexi_gd
博客用到的代码
Version Downloads Last Updated
1.4.0 200,591 6/14/2024
1.4.0-dev.12 68,760 5/19/2024
1.3.2 3,565 5/21/2024
1.3.0 20,577 5/8/2024
1.3.0-dev.16 211 5/7/2024
1.3.0-dev.13 136 5/2/2024
1.3.0-dev.5 2,495 2/15/2024
1.3.0-dev.2 7,748 11/15/2023
1.2.9 9,578 2/15/2024
1.2.8 12,951 11/17/2023
1.2.7 11,645 11/1/2023
1.2.0-dev.34 2,654 9/29/2023
1.2.0-dev.32 418 9/26/2023
1.2.0-dev.30 177 9/26/2023
1.2.0-dev.28 119 9/26/2023
1.2.0-dev.20 2,479 9/13/2023
1.2.0-dev.18 1,237 8/30/2023
1.2.0-dev.12 1,069 8/15/2023
1.2.0-dev.8 1,940 7/21/2023
1.2.0-dev.6 182 7/21/2023
Loading failed