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.