API links to AOT /8 (#29162)

* API links to AOT /8

* API links to AOT /8

* API links to AOT /8
pull/29162/merge
Rick Anderson 2023-05-03 15:24:06 -10:00 committed by GitHub
parent 944b7fa736
commit 814762d423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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">