From 7699d41bd4586d8505436b4b5f85f709c80438ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Wed, 20 Nov 2024 21:05:41 -0500 Subject: [PATCH] docs: Adjust for CPM --- doc/using-xamlmerge.md | 43 ++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/doc/using-xamlmerge.md b/doc/using-xamlmerge.md index 626a653..8c4e23a 100644 --- a/doc/using-xamlmerge.md +++ b/doc/using-xamlmerge.md @@ -12,16 +12,37 @@ To limit the impact of the traversal, this task takes all resource dictionaries ## Using the task -1. In your `csproj` file, include the following block: - - ```xml - - <_Uno_XamlMerge_Task_Version>1.0.0 - - - - - ``` +1. Add a package reference: + + * If your project does not use [Central Package Management](https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management#enabling-central-package-management), in your `csproj` file, include the following block: + + ```xml + + <_Uno_XamlMerge_Task_Version>1.0.0 + + + + + ``` + + * If your project is using [Central Package Management](https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management#enabling-central-package-management), add the following to your `Directory.Packages.props`: + + ```xml + + <_Uno_XamlMerge_Task_Version>1.0.0 + + + + + ``` + + Then the following to your `.csproj`: + + ```xml + + + + ``` 1. Specify the resource dictionaries to be merged: @@ -63,6 +84,8 @@ To limit the impact of the traversal, this task takes all resource dictionaries ``` + Then replace `REPLACE_ME/` with either the library name if you're adding the package to a class library, or with nothing if you're adding it to your main project (e.g. `ms-appx:///Generated/mergedpages.xaml`). + ## Multiple generated files There are scenarios where placing groups of XAML files in separate merged files are useful, particularly, when IL Linking must be used.