Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.42 KB

ConsoleNativeAOT.md

File metadata and controls

32 lines (23 loc) · 1.42 KB

Console native AOT application

CSharp

This example is very similar to simple console application, except that this is native AOT application.

The project file looks like this:

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <PublishAot>true</PublishAot>
        <RuntimeIdentifier>win-x64</RuntimeIdentifier>
        <OutputType>Exe</OutputType>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Pure.DI" Version="2.1.41">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
    </ItemGroup>

</Project>

It contains an additional reference to the NuGet package:

Pure.DI NuGet DI Source code generator