Add lightweight Native AOT essentials sample - #20
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a minimal .NET 10 companion sample for the .NET 8 Essentials: Core Features & Getting Started tutorial.
What's included
New sample:
dotnet-8-essentials/core-features-get-started/— 10 filesWebApplication.CreateSlimBuilderAOT-friendly hostingITextTransformer/TextTransformer)/), runtime capability (/runtime), typed echo POST (/echo)System.Text.Jsonmetadata viaAppJsonSerializerContext(all 5 body types registered)PublishAot=truein the project file (analysis participates during development)Root README: New sample row + updated
.NET 8 Essentialstree (3 siblings)GitHub Actions: New
test-native-aot-essentialsjob — installs clang/zlib1g-dev, publisheslinux-x64Native AOT, fails on AOT/trim warnings, executes the native binary directly (not viadotnet), verifiesdynamicCodeSupported=false/dynamicCodeCompiled=false, exact JSON responses, and 400 on invalid inputDeliberately omitted (stays in the full tutorial)
Todo CRUD, controllers/MVC, EF Core/databases, Swagger/OpenAPI, reflection fallbacks, benchmarking, performance claims, Docker, authentication, cloud deployment
Versions
Microsoft.AspNetCore.Mvc.Testing: 10.0.10Microsoft.NET.Test.Sdk: 18.8.1xunit.v3: 3.2.2xunit.runner.visualstudio: 3.1.5Validation
dotnet restore— passeddotnet build --configuration Release— passed (0 errors, 0 warnings)dotnet test --configuration Release— passed (8/8)linux-x64) — passed, no IL2026/IL3050/other warningsdynamicCodeSupported=false,dynamicCodeCompiled=false; echo{"message":"HELLO NATIVE AOT","length":16}; invalid input → 400