dotnet / dotnet/sdk

`PublishAot=true` and `IncludeNativeLibrariesForSelfExtract=true` should produce a warning

Open
#49,995 1 comment 0 reactions 0 assignees View on GitHub
Area-NativeAOT untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

Using `PublishSingleFile=true` and `IncludeNativeLibrariesForSelfExtract=true` produces a single file when using non-AOT publishing. However, if you turn on AOT with `PublishAot=true`, it silently ignores `IncludeNativeLibrariesForSelfExtract=true`. According to @MichalStrehovsky, [this is intentional](https://github.com/dotnet/runtime/discussions/117986) (in the "just never implemented" way). The `publish` command should produce a warning, possibly linking to [the MSDN article about linking native libraries into your binary](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/interop#linking).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.