.NET 8 function app with AOT publishing enabled.
-
Use the worker packages from this branch: https://github.com/Azure/azure-functions-dotnet-worker/tree/shkr/aot_for-net8. This build was using that branch and you may use those artifacts.
-
Set up a local nuget source and drop the packages from above step.
-
Open this function app in VS, go to manage nuget packages and select the local nuget source and update to the packages from above step.
-
To publish AOT output, open a cmd prompt in the function app root (where you will see the .csproj file) and run
dotnet publish -r win-x64 -c release. This will generate the publish output in "Net8AOTFunctionApp\bin\release\net8.0\win-x64\publish" directory. -
Open
workerconfig.jsonfrom the publish directory and update the value ofdefaultWorkerPathproperty fromNet8AOTFunctionApp.dlltoNet8AOTFunctionApp.exe
Now this payload is good to be deployed.