ChsBuffer.Avalonia.AppHost
12.0.7
dotnet add package ChsBuffer.Avalonia.AppHost --version 12.0.7
NuGet\Install-Package ChsBuffer.Avalonia.AppHost -Version 12.0.7
<PackageReference Include="ChsBuffer.Avalonia.AppHost" Version="12.0.7"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="ChsBuffer.Avalonia.AppHost" Version="12.0.7" />
<PackageReference Include="ChsBuffer.Avalonia.AppHost"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add ChsBuffer.Avalonia.AppHost --version 12.0.7
#r "nuget: ChsBuffer.Avalonia.AppHost, 12.0.7"
#:package ChsBuffer.Avalonia.AppHost@12.0.7
#addin nuget:?package=ChsBuffer.Avalonia.AppHost&version=12.0.7
#tool nuget:?package=ChsBuffer.Avalonia.AppHost&version=12.0.7
ChsBuffer.Avalonia.AppHost
Prelinked Avalonia 12 apphost and single-file host templates for .NET 10 (10.0.15) and .NET 11 (11.0.0), with SkiaSharp, HarfBuzzSharp and, on Windows, ANGLE statically linked. Published applications need no separate copies of these native libraries.
Packages
| Package | Templates |
|---|---|
ChsBuffer.Avalonia.AppHost |
All supported RIDs |
ChsBuffer.Avalonia.AppHost.win-x64 |
win-x64 only |
ChsBuffer.Avalonia.AppHost.win-arm64 |
win-arm64 only |
ChsBuffer.Avalonia.AppHost.linux-x64 |
linux-x64 only |
ChsBuffer.Avalonia.AppHost.linux-musl-x64 |
linux-musl-x64 (Alpine Linux) only |
ChsBuffer.Avalonia.AppHost.linux-musl-arm64 |
linux-musl-arm64 (Alpine Linux) only |
Each RID package depends on the SkiaSharp and HarfBuzzSharp versions linked into its templates.
Activation
The templates replace the SDK host when a C# project that targets .NET 10 or .NET 11 (including OS-specific TFMs such as net11.0-windows) builds for the RuntimeIdentifier of a referenced RID package: -r <RID>, <RuntimeIdentifier>, or the RID that PublishSingleFile infers.
Other builds keep the SDK host and publish the dynamic libraries. Builds without a RuntimeIdentifier and projects that target an earlier .NET do so silently. UseAppHost=false, F# and Visual Basic projects, and RIDs without a template warn. PublishAot=true warns unless the project references a HostForge static graphics package such as ChsBuffer.SkiaSharp.Static, which links the libraries into the NativeAOT executable.
The single-file host embeds the native .NET runtime it was built from (10.0.15 or 11.0.0), while the managed framework comes from the runtime pack chosen at publish time. The .NET SDK 11.0.100 selects exactly these runtime packs; with another SDK, set RuntimeFrameworkVersion to the template's version.
MSBuild properties
| Property | Default | Effect |
|---|---|---|
DisableSkiaHarfBuzzRuntimeCopy |
true |
Keeps the SkiaSharp and HarfBuzzSharp dynamic libraries out of the publish directory and the single-file bundle. |
DisableAngleRuntimeCopy |
true |
Keeps the ANGLE library (av_libglesv2.dll) out of the publish directory and the single-file bundle. |
A module initializer registers the DllImport resolvers that load these libraries from the executable. Registering another resolver for SkiaSharp, HarfBuzzSharp or Avalonia.Win32 later, for example in Main, throws InvalidOperationException; one registered earlier stays in effect, and the matching property must then be false so that the libraries are published.
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- ChsBuffer.Avalonia.AppHost.linux-musl-arm64 (>= 12.0.7)
- ChsBuffer.Avalonia.AppHost.linux-musl-x64 (>= 12.0.7)
- ChsBuffer.Avalonia.AppHost.linux-x64 (>= 12.0.7)
- ChsBuffer.Avalonia.AppHost.win-arm64 (>= 12.0.7)
- ChsBuffer.Avalonia.AppHost.win-x64 (>= 12.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on ChsBuffer.Avalonia.AppHost:
| Repository | Stars |
|---|---|
|
HMBSbige/NatTypeTester
测试当前网络的 NAT 类型(STUN)
|
| Version | Downloads | Last Updated |
|---|---|---|
| 12.0.7 | 100 | 11/22/2026 |
| 12.0.7-skia4 | 90 | 11/22/2026 |
| 12.0.6 | 94 | 11/22/2026 |
| 12.0.6-skia4 | 92 | 11/22/2026 |
| 12.0.5 | 94 | 11/21/2026 |
| 12.0.5-skia4 | 88 | 11/21/2026 |
| 12.0.4 | 92 | 11/21/2026 |
| 12.0.4-skia4 | 86 | 11/21/2026 |
| 12.0.3 | 92 | 11/21/2026 |
| 12.0.3-skia4 | 88 | 11/21/2026 |
| 12.0.2 | 106 | 11/16/2026 |
| 12.0.2-skia4 | 97 | 11/16/2026 |
| 12.0.1 | 172 | 10/14/2026 |
| 12.0.1-skia4 | 148 | 10/14/2026 |
| 12.0.0 | 265 | 9/4/2026 |
| 12.0.0-preview.6 | 224 | 7/21/2026 |
| 12.0.0-preview.5 | 323 | 4/24/2026 |
| 12.0.0-preview.4 | 243 | 3/24/2026 |
| 11.0.0-preview.5 | 86 | 4/24/2026 |
| 11.0.0-preview.4 | 80 | 3/24/2026 |