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
<PackageReference Include="Uno.Dsp.Tasks" Version="1.4.0" />
<PackageVersion Include="Uno.Dsp.Tasks" Version="1.4.0" />
<PackageReference Include="Uno.Dsp.Tasks" />
paket add Uno.Dsp.Tasks --version 1.4.0
#r "nuget: Uno.Dsp.Tasks, 1.4.0"
#:package Uno.Dsp.Tasks@1.4.0
#addin nuget:?package=Uno.Dsp.Tasks&version=1.4.0
#tool nuget:?package=Uno.Dsp.Tasks&version=1.4.0
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.Sdkproject style, you don't need to add the reference to theUno.Dsp.Taskspackage. 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
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>Place your JSON theme file close to where you want the color overrides file to be generated. This is usually in the
Stylesfolder on the shared project.ex:
MyProject.Shared\Styles\MyTheme.jsonYou need to add the following
PropertyGroupto your project file:[-- MyProject.Shared\MyProject.Shared.csproj --] <PropertyGroup> <UnoDspImportColors Include="*.json" Generator="Xaml" /> </PropertyGroup>Compile and you should get a new file named
MyTheme.xamlin the same folder as your theme file.Reference this file in your
App.xamlfile, 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.
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 |