Skip to main content
.NETStandard2.0

MSBuild targets to aid in crosscompiling Native AOT publishing.

Published
Jun 7, 2026
4mo ago
Total Downloads
936
936

Install

dotnet add package PublishAotZig --version 1.0.0
ProductVersions
.NET Standard
netstandard2.0

README

PublishAotZig

这是一个包含 MSBuild 目标的 NuGet 包,用于辅助 PublishAot 的交叉编译。使用 ZIG 工具链在 Windows 机器上交叉编译到多个 linux RID。

本项目源于 MichalStrehovsky/PublishAotCross,做了以下额外工作:

  • 补齐部分 zlib.a
  • Nuget 包含了 zig v0.16.0
  • Nuget 包含了 llvm-objcopy

如何使用

  1. 在 Native AOT 的项目中,添加对此 NuGet 包的引用。

  2. 在 Windows 机器上,可以额外 AOT 发布到以下 RID:

  • dotnet publish -r linux-x64
  • dotnet publish -r linux-arm64
  • dotnet publish -r linux-arm (.NET 9+)
  • dotnet publish -r linux-musl-x64
  • dotnet publish -r linux-musl-arm64
  • dotnet publish -r linux-musl-arm (.NET 9+)

Changes from Previous Version

No structural changes between v1.0.0-beta1 and v1.0.0.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.