HotAvalonia.Fody
3.0.0
Prefix Reserved
dotnet add package HotAvalonia.Fody --version 3.0.0
NuGet\Install-Package HotAvalonia.Fody -Version 3.0.0
<PackageReference Include="HotAvalonia.Fody" Version="3.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="HotAvalonia.Fody" Version="3.0.0" />
<PackageReference Include="HotAvalonia.Fody"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add HotAvalonia.Fody --version 3.0.0
#r "nuget: HotAvalonia.Fody, 3.0.0"
#addin nuget:?package=HotAvalonia.Fody&version=3.0.0
#tool nuget:?package=HotAvalonia.Fody&version=3.0.0
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 a Fody weaver created to overcome certain limitations that would otherwise render hot reload infeasible on non-x64 devices, while also enhancing the overall 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 SolutionPath="$(SolutionPath)">
<PopulateOverride Enable="true" />
<UseHotReload Enable="true" GeneratePathResolver="true" />
<FileSystemCredentials Enable="true" Address="127.0.0.1" Port="20158" Secret="TXkgU3VwZXIgU2VjcmV0IFZhbHVl" />
<References Enable="true" Exclude="HotAvalonia.Core;Avalonia.Markup.Xaml.Loader" />
</HotAvalonia>
</Weavers>
</WeaverConfiguration>
</PropertyGroup>
Here's a quick overview of the weaver-specific properties:
HotAvalonia
The root configuration element represents the entry-point weaver that orchestrates and manages feature-specific weavers, while its child nodes represent the individual feature-specific weavers themselves.
Name | Description | Default | Examples |
---|---|---|---|
SolutionPath |
Sets the path to a solution file (.sln ) related to this project. |
If not set, the weaver will attempt to search for the first *.sln file from the current project directory upwards. |
$(SolutionPath) |
PopulateOverride
This feature weaver is responsible for recompiling Avalonia resources (such as styles and resource dictionaries) to make them hot-reloadable even on non‑x64 devices, where injection‑based hot reload is unavailable.
Name | Description | Default | Examples |
---|---|---|---|
Enable |
Sets a value indicating whether this feature weaver is enabled. | false |
true <br> 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 recompile. 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 <br> false |
GeneratePathResolver |
Sets a value indicating whether this feature weaver should automatically generate HotAvalonia.AvaloniaHotReloadExtensions.ResolveProjectPath(Assembly) from the solution file if this method does not already exist. |
false |
true <br> false |
FileSystemCredentials
This feature weaver is responsible for injecting remote file system credentials into the app, enabling it to connect to the appropriate host to retrieve all the information necessary for hot reload to function.
Name | Description | Default | Examples |
---|---|---|---|
Enable |
Sets a value indicating whether this feature weaver is enabled. | false |
true <br> false |
Address |
Provides the address of the remote file system to the app. | 127.0.0.1 |
192.168.0.2 |
Port |
Provides the port of the remote file system to the app. | 20158 |
8080 |
Secret |
Provides the secret required by the remote file system to the app. | N/A | TXkgU3VwZXIgU2VjcmV0IFZhbHVl |
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 <br> 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.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Fody (>= 6.9.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on HotAvalonia.Fody:
Package | 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. |
GitHub repositories
This package is not used by any popular GitHub repositories.