Hello @Brendan Finnegan
The difference you’re seeing is due to the two different execution models for .NET functions: the in-process model and the isolated worker model.
The in-process model runs your .NET class library functions in the same process as the Functions host runtime. This is the model that’s used when "FUNCTIONS_WORKER_RUNTIME": "dotnet"
is set in your local.settings.json
file.
On the other hand, the isolated worker model runs your .NET functions in an isolated worker process. This is the model that’s used when "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"
is set in your local.settings.json
file.
When you create a new .NET 8.0 Azure function in Visual Studio 2022, it defaults to the in-process model. However, when you upgraded your existing .NET 6.0 functions to .NET 8.0, you also migrated them to the isolated worker model.
The isolated worker model has several benefits over the in-process model:
- Fewer conflicts: Your functions run in a separate process, so assemblies used in your app don’t conflict with different versions of the same assemblies used by the host process.
- Full control of the process: You control the start-up of the app, which means that you can manage the configurations used and the middleware started.
- Standard dependency injection: You can use current .NET behaviors for dependency injection and incorporating middleware into your function app.
- .NET version flexibility: Your functions can run on versions of .NET not natively supported by the Functions runtime, including the .NET Framework.
The differences in NuGet packages, dependency injections, and bindings that you’re seeing between the upgraded .NET 6.0 apps and the brand new .NET 8.0 app are likely due to the differences between these two execution models.
I hope this helps clarify the difference.
I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.