Home > database >  Net Core 7 and AOT: is it needed to add in project file the configuration in all libraries of the so
Net Core 7 and AOT: is it needed to add in project file the configuration in all libraries of the so

Time:11-11

I wanted to compile an application with AOT, I am following the documentation: https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/

Here, it is said I have to add a paramater in the project file:

<PropertyGroup>
    <PublishAot>true</PublishAot>
</PropertyGroup>

Supose that I have a WPF application that uses another libraries in the same solution. I have to add this parameter in all the projects or it is enough in the main prject (the WPF project)?

Thanks.

CodePudding user response:

All libraries, AOT is on the executable level.

Though, of course, you will get incremental benefits by enabling it in only a subset of your libraries, then increasing the number of libraries that use AOT over time. Or even just enabling it on libraries that execute the most code at start-up, and leaving the other to be JITted in peace later.

  • Related