API links to AOT /8 (#29162)
* API links to AOT /8 * API links to AOT /8 * API links to AOT /8pull/29162/merge
parent
944b7fa736
commit
814762d423
|
@ -5,7 +5,7 @@ description: Learn about ASP.NET Core support for native AOT
|
|||
monikerRange: '>= aspnetcore-8.0'
|
||||
ms.author: midenn
|
||||
ms.custom: mvc
|
||||
ms.date: 4/10/2023
|
||||
ms.date: 5/5/2023
|
||||
uid: fundamentals/native-aot
|
||||
---
|
||||
# ASP.NET Core support for native AOT
|
||||
|
@ -244,7 +244,7 @@ The <xref:Microsoft.AspNetCore.Builder.WebApplication.CreateSlimBuilder>:
|
|||
|
||||
:::code language="csharp" source="~/fundamentals/aot/samples/Program.cs" highlight="4":::
|
||||
|
||||
Because unused code is trimmed during publishing for native AOT, the app can't use unbounded reflection at runtime. Source generators are used to produce code to avoid the need for reflection. In some cases source generators produce code optimized for AOT even when a generator is not required. To view source code that is generated based on the code in `Program.cs` add the `<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>` property to `MyFirstAotWebApi.csproj`:
|
||||
Because unused code is trimmed during publishing for native AOT, the app can't use unbounded reflection at runtime. Source generators are used to produce code to avoid the need for reflection. In some cases source generators produce code optimized for AOT even when a generator is not required. To view source code that is generated based on the code in `Program.cs` add the [`<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>`](/dotnet/csharp/roslyn-sdk/source-generators-overview) property to `MyFirstAotWebApi.csproj`:
|
||||
|
||||
```xml
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
|
Loading…
Reference in New Issue