Open
Description
Is your feature request related to a problem? Please describe.
When publish with AOT, add a constant NATIVEAOT
so that we could do aot-specific operation likes
#if NATIVEAOT
// .. aot-only
#endif
Describe the solution you'd like
When PublishAot
is true
, define additional constant
<PropertyGroup>
<DefineConstants Condition="'$(PublishAot)'=='true'">$(DefineConstants);NATIVEAOT</DefineConstants>
</PropertyGroup>
Additional context
see comment:
dotnet/runtime#109005 (reply in thread)