Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Adjust for CPM #141

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 33 additions & 10 deletions doc/using-xamlmerge.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<PropertyGroup>
<_Uno_XamlMerge_Task_Version>1.0.0</_Uno_XamlMerge_Task_Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.XamlMerge.Task" Version="$(_Uno_XamlMerge_Task_Version)" />
</ItemGroup>
```
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
<PropertyGroup>
<_Uno_XamlMerge_Task_Version>1.0.0</_Uno_XamlMerge_Task_Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.XamlMerge.Task" Version="$(_Uno_XamlMerge_Task_Version)" />
</ItemGroup>
```

* 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
<PropertyGroup>
<_Uno_XamlMerge_Task_Version>1.0.0</_Uno_XamlMerge_Task_Version>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Uno.XamlMerge.Task" Version="$(_Uno_XamlMerge_Task_Version)" />
</ItemGroup>
```

Then the following to your `.csproj`:

```xml
<ItemGroup>
<PackageVersion Include="Uno.XamlMerge.Task" Version="$(_Uno_XamlMerge_Task_Version)" />
</ItemGroup>
```

1. Specify the resource dictionaries to be merged:

Expand Down Expand Up @@ -63,6 +84,8 @@ To limit the impact of the traversal, this task takes all resource dictionaries
</ResourceDictionary>
```

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.
Expand Down
Loading