HotAvalonia.Fody 3.1.0
Important
You probably don't want to install this package manually.
Please, check out the main HotAvalonia package, which will set everything up for you automatically.
HotAvalonia.Fody
HotAvalonia.Fody is an optional Fody weaver designed to enhance the overall hot reload experience for HotAvalonia users.
Usage
Like any other Fody weaver, HotAvalonia.Fody can be configured either via FodyWeavers.xml, or directly in your project file using the WeaverConfiguration property, as can be seen below:
<PropertyGroup>
<WeaverConfiguration>
<Weavers>
<HotAvalonia>
<Solution Path="$(SolutionPath)">
<Project Path="/home/user/projects/MyApp/src/MyApp/MyApp.csproj" AssemblyName="MyApp" />
<Project Path="/home/user/projects/MyApp/src/MyApp.Desktop/MyApp.Desktop.csproj" AssemblyName="MyApp.Desktop" />
</Solution>
<PopulateOverride Enable="true" />
<UseHotReload Enable="true" GeneratePathResolver="true" />
<References Enable="false" Exclude="HotAvalonia.Core;Avalonia.Markup.Xaml.Loader" />
</HotAvalonia>
</Weavers>
</WeaverConfiguration>
</PropertyGroup>
Here's a quick overview of the weaver-specific properties:
PopulateOverride
This feature weaver is responsible for injecting a small piece of logic into Avalonia resources (such as styles and resource dictionaries), allowing their original, precompiled Populate method to be overridden at runtime even in environments where method injection is unavailable.
| Name | Description | Default | Examples |
|---|---|---|---|
Enable |
Sets a value indicating whether this feature weaver is enabled. | false |
true false |
Note that for this weaver to work properly, Fody needs to run after Avalonia has finished compiling the XAML files; otherwise, there will be nothing to inject into. This can be achieved by:
<FodyDependsOnTargets>$(FodyDependsOnTargets);CompileAvaloniaXaml</FodyDependsOnTargets>
UseHotReload
This feature weaver is responsible for automatically invoking HotAvalonia.AvaloniaHotReloadExtensions.UseHotReload(AppBuilder) on the AppBuilder instance created during app initialization, thereby kicking HotAvalonia into action. Thanks to this, users do not need to modify their source code to enable hot reload for their application.
| Name | Description | Default | Examples |
|---|---|---|---|
Enable |
Sets a value indicating whether this feature weaver is enabled. | false |
true false |
GeneratePathResolver |
Sets a value indicating whether this feature weaver should automatically generate HotAvalonia.AvaloniaHotReloadExtensions.ResolveProjectPath(Assembly) based on the <Solution> element, if this method does not already exist. |
false |
true false |
References
This feature weaver is responsible for removing specified assembly references from the main module definition of your project and cleaning up related copy-local paths.
| Name | Description | Default | Examples |
|---|---|---|---|
Enable |
Sets a value indicating whether this feature weaver is enabled. | false |
true false |
Exclude |
Provides a semicolon-separated list of assembly names, all mentions of which should be erased from the target project. | N/A | HotAvalonia.Core;Avalonia.Markup.Xaml.Loader |
License
Licensed under the terms of the MIT License.
Showing the top 20 packages that depend on HotAvalonia.Fody.
| Packages | Downloads |
|---|---|
|
HotAvalonia
A hot reload plugin for Avalonia that enables you to see UI changes in real time as you edit XAML files, drastically accelerating your design and development workflow.
|
14 |
|
HotAvalonia
An IDE-agnostic hot reload plugin for Avalonia that lets you see UI changes in real time as you edit XAML files, drastically accelerating your design and development workflow.
|
14 |
|
HotAvalonia
A hot reload plugin for Avalonia that enables you to see UI changes in real time as you edit XAML files, drastically accelerating your design and development workflow.
|
13 |
|
HotAvalonia
An IDE-agnostic hot reload plugin for Avalonia that lets you see UI changes in real time as you edit XAML files, drastically accelerating your design and development workflow.
|
11 |
|
HotAvalonia
A hot reload plugin for Avalonia that enables you to see UI changes in real time as you edit XAML files, drastically accelerating your design and development workflow.
|
11 |
|
HotAvalonia
An IDE-agnostic hot reload plugin for Avalonia that lets you see UI changes in real time as you edit XAML files, drastically accelerating your design and development workflow.
|
10 |
.NET Standard 2.0
- Fody (>= 6.9.2)