Azure Functions applications built with C# can run using either the in-process model or the isolated worker model. For existing applications, moving from one model to the other is not simply a matter of changing a project setting. The application startup model, NuGet packages, function attributes, dependency injection, HTTP handling, and Azure configuration can all be affected.
Microsoft is ending support for the Azure Functions .NET in-process model on November 10, 2026. Existing applications that still use the in-process model should therefore be migrated to the isolated worker model.
The good news is that the migration can be handled incrementally and tested locally before the Azure configuration is changed.
This article walks through the important changes, common migration problems, and a practical approach for moving an existing C# Azure Functions application to the isolated worker model.
Understanding the Difference
The biggest difference is where your function code executes.
With the in-process model, your function code runs inside the same process as the Azure Functions host.
With the isolated worker model, your application runs in a separate .NET worker process. This separation gives the application more control over startup, dependency injection, middleware, configuration, and assembly dependencies.
The difference can be summarized as follows:
Area | In Process | Isolated Worker |
|---|
Execution | Same process as Functions host | Separate worker process |
SDK | Microsoft.NET.Sdk.Functions | Azure.Functions.Sdk |
Function attribute | [FunctionName]
| [Function]
|
Startup | Functions-managed startup | Program.cs
|
Dependency injection | Functions-specific integration | Standard .NET DI |
Middleware | Limited | Supported |
Package namespace | Microsoft.Azure.WebJobs.* | Microsoft.Azure.Functions.Worker.* |
Runtime isolation | Less isolation | Better isolation |
.NET flexibility | More limited | More flexible |
The isolated worker model is essentially closer to a normal .NET application with Azure Functions hosting around it.
Before Starting the Migration
Do not begin by changing FUNCTIONS_WORKER_RUNTIME in the Azure portal.
The application code and Azure configuration need to move together. Microsoft specifically recommends updating the project locally, testing it, and then updating the Azure application configuration and deploying the migrated application.
Before making changes, check the current application.
You can inspect the Azure Functions runtime configuration with Azure CLI:
az functionapp config appsettings list \
--name <app-name> \
--resource-group <resource-group> \
--query "[?name=='FUNCTIONS_WORKER_RUNTIME'].value" \
-o tsv
If the result is:
dotnet
the application is using the in-process model.
If the result is:
dotnet-isolated
the application is already using the isolated worker model.
Also check the following before migration:
Current .NET target framework
Azure Functions runtime version
NuGet packages
Function bindings
HTTP triggers
Dependency injection
Durable Functions usage
Application Insights configuration
host.json
local.settings.json
CI/CD deployment configuration
The migration is much easier when you know which parts of the application depend directly on the old execution model.
Update the Project File
One of the first major changes is the .csproj file.
An in-process project commonly contains a reference similar to:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions"
Version="4.x.x" />
</ItemGroup>
</Project>
The isolated project uses the Azure Functions SDK and worker packages instead.
For example:
<Project Sdk="Microsoft.Azure.Functions.Worker.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker"
Version="2.x.x" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk"
Version="2.x.x"
OutputItemType="Analyzer"
PrivateAssets="all" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore"
Version="2.x.x" />
</ItemGroup>
</Project>
The exact package versions should be selected from the versions supported by your target .NET runtime and the current Azure Functions documentation.
The important change is the package family.
An isolated worker application should not retain references to the old Microsoft.NET.Sdk.Functions package or packages in the Microsoft.Azure.WebJobs.* namespace that belong to the in-process model.
Add Program.cs
An in-process Azure Functions application may not have the same application entry point structure as an isolated worker application.
The isolated model uses Program.cs as the startup entry point.
A basic application can look like this:
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults()
.ConfigureServices(services =>
{
services.AddApplicationInsightsTelemetryWorkerService();
services.ConfigureFunctionsApplicationInsights();
})
.Build();
host.Run();
This is an important architectural change.
Instead of relying on the Functions host to manage the application's startup behavior, the worker application has its own startup pipeline.
This is also where services can be registered using normal .NET dependency injection.
For example:
.ConfigureServices(services =>
{
services.AddScoped<OrderService>();
services.AddSingleton<IMessageProcessor, MessageProcessor>();
})
The isolated worker model provides standard dependency injection behavior and greater control over application startup.
Update Function Attributes
One of the most visible code changes is the function attribute.
An in-process function may look like this:
[FunctionName("ProcessOrder")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post")]
HttpRequest req,
ILogger log)
{
log.LogInformation("Processing order.");
return new OkObjectResult("Order processed");
}
The isolated worker model uses the Function attribute:
[Function("ProcessOrder")]
public async Task<HttpResponseData> Run(
[HttpTrigger(AuthorizationLevel.Function, "post")]
HttpRequestData req)
{
var response = req.CreateResponse(HttpStatusCode.OK);
await response.WriteStringAsync("Order processed");
return response;
}
Notice that this is more than a simple attribute rename.
The HTTP request and response types can also change.
The old model commonly uses ASP.NET Core types such as:
HttpRequest
IActionResult
The isolated worker model can use:
HttpRequestData
HttpResponseData
If ASP.NET Core integration is enabled, you can also use ASP.NET Core HTTP types and middleware. This can be useful when migrating applications that already have a substantial ASP.NET Core programming model.
Update Dependency Injection
Dependency injection is another area where the migration can actually improve the application structure.
Suppose the existing function uses a service:
public class OrderFunction
{
private readonly OrderService _orderService;
public OrderFunction(OrderService orderService)
{
_orderService = orderService;
}
[FunctionName("Order")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post")]
HttpRequest req)
{
var result = await _orderService.ProcessAsync();
return new OkObjectResult(result);
}
}
In the isolated worker model, the same dependency can be registered through Program.cs:
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults()
.ConfigureServices(services =>
{
services.AddScoped<OrderService>();
})
.Build();
host.Run();
Then the function can receive it through its constructor:
public class OrderFunction
{
private readonly OrderService _orderService;
public OrderFunction(OrderService orderService)
{
_orderService = orderService;
}
[Function("Order")]
public async Task<HttpResponseData> Run(
[HttpTrigger(AuthorizationLevel.Function, "post")]
HttpRequestData req)
{
var result = await _orderService.ProcessAsync();
var response = req.CreateResponse(HttpStatusCode.OK);
await response.WriteAsJsonAsync(result);
return response;
}
}
This approach makes service registration explicit and keeps the function focused on handling the trigger.
Review Logging Changes
Logging is another area that often causes compilation errors during migration.
Instead of passing an ILogger parameter directly into every function, you can inject ILogger<T> through the constructor.
For example:
public class OrderFunction
{
private readonly ILogger<OrderFunction> _logger;
public OrderFunction(ILogger<OrderFunction> logger)
{
_logger = logger;
}
[Function("Order")]
public async Task Run(
[TimerTrigger("0 */5 * * * *")]
TimerInfo timer)
{
_logger.LogInformation("Order processing started.");
}
}
This fits naturally with the standard .NET dependency injection model.
It also makes logging dependencies easier to test because they are explicit dependencies of the class.
Review Bindings
Do not assume that every binding will migrate without changes.
Review each trigger and binding in the application:
HTTP
Timer
Queue Storage
Blob Storage
Service Bus
Event Grid
Event Hubs
Cosmos DB
Durable Functions
The extension package names change in the isolated model.
For example, the old WebJobs extension packages are replaced by worker extension packages.
You should also check extension versions because changing an extension package can introduce changes to binding behavior or configuration. Microsoft specifically recommends reviewing extension documentation during migration.
A useful approach is to migrate one binding type at a time and test it instead of changing the entire application blindly.
Review host.json
The host.json file usually remains part of the project, but some settings can behave differently when extension versions change.
For example:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true
}
}
}
}
Do not replace the entire host.json simply because the execution model changed.
Instead, compare the existing configuration against the documentation for the extension versions you are installing.
This avoids introducing unrelated configuration changes during the migration.
Review local.settings.json
Your local settings should also use the isolated worker runtime.
For example:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"
}
}
The most important setting here is:
FUNCTIONS_WORKER_RUNTIME=dotnet-isolated
Make sure the local configuration matches the worker model before testing.
Test the Application Locally
Do not immediately deploy the migrated project to production.
Run the application locally using the Azure Functions Core Tools.
For example:
func start
Then test every trigger that your application uses.
For HTTP functions, test:
curl -X POST http://localhost:7071/api/ProcessOrder \
-H "Content-Type: application/json" \
-d '{"orderId":123}'
For timer, queue, Service Bus, or other event-driven functions, create test messages and confirm that the function is triggered correctly.
Pay attention to:
A migration that compiles successfully can still contain runtime problems.
Common Migration Problems
Functions Are Not Showing in the Portal
If functions disappear after deployment, check the project configuration first.
Common causes include:
Incorrect worker SDK
Missing Program.cs
Incorrect function attribute
Incorrect package references
Deployment of the wrong build output
Microsoft identifies missing Program.cs, incorrect packages, and unchanged function attributes as common causes of migration failures.
Application Fails After Changing the Runtime Setting
This is one of the most important migration mistakes.
If you change:
FUNCTIONS_WORKER_RUNTIME=dotnet
to:
FUNCTIONS_WORKER_RUNTIME=dotnet-isolated
while the deployed code is still an in-process application, the platform configuration and application code no longer match.
The reverse is also true.
Microsoft recommends changing the runtime configuration and deploying the migrated application as part of the same migration process. A temporary mismatch can result in errors such as AZFD0013.
HTTP Functions Return Unexpected Responses
If an HTTP function previously returned:
IActionResult
but the migrated version uses:
HttpResponseData
make sure the response status, headers, and body are explicitly created.
For example:
var response = req.CreateResponse(HttpStatusCode.BadRequest);
await response.WriteStringAsync("Invalid order.");
return response;
If your application depends heavily on ASP.NET Core HTTP behavior, consider using ASP.NET Core integration instead of rewriting every HTTP function around HttpRequestData and HttpResponseData.
Dependency Injection Stops Working
If a service was previously registered through the old Functions startup mechanism, it needs to be moved into Program.cs.
For example:
services.AddScoped<OrderService>();
services.AddSingleton<CacheService>();
services.AddHttpClient();
Also check service lifetimes carefully.
A singleton service that stores request-specific state can create difficult bugs, particularly when multiple function invocations execute concurrently.
Migrating With a Staging Slot
For production applications, a deployment slot provides a safer migration path.
A practical sequence is:
Create or use a staging slot.
Update the staging configuration to dotnet-isolated.
Deploy the migrated application to the staging slot.
Run functional and integration tests.
Review logs and Application Insights.
Confirm all functions are discovered.
Swap staging with production.
Microsoft recommends using a staging slot when feasible because it prevents the temporary configuration/code mismatch from affecting the production slot.
This is especially useful for applications containing several triggers or integrations where a local test cannot reproduce the complete production environment.
Updating CI/CD Pipelines
The migration does not end with the application code.
If your application is deployed through GitHub Actions, Azure DevOps, or another CI/CD system, review the deployment configuration.
Check:
For example, an automated deployment should build the isolated project using the intended .NET SDK:
dotnet restore
dotnet build --configuration Release
dotnet publish --configuration Release --output ./publish
The deployment pipeline should then publish the resulting application to the correct Function App or slot.
This prevents a situation where local development uses the isolated model but the deployment pipeline still assumes the old project structure.
Migration Checklist
Before considering the migration complete, verify the following:
Area | Check |
|---|
Runtime | Functions runtime is compatible |
Project | Target framework is supported |
SDK | Azure Functions SDK uses the isolated model |
Packages | Old WebJobs packages removed where applicable |
Startup | Program.cs added
|
Attributes | [FunctionName] changed to [Function]
|
DI | Services registered through standard .NET DI |
HTTP | Request and response handling reviewed |
Bindings | Every trigger and binding tested |
Configuration | FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated
|
Logging | Worker logging verified |
Local testing | All functions tested locally |
CI/CD | Build and deployment pipeline updated |
Production | Staging deployment tested |
Monitoring | Application Insights checked |
Advantages of the Isolated Worker Model
The isolated model provides several practical benefits.
Better Process Isolation
The function application runs in a separate worker process from the Functions host. This reduces assembly conflicts between application dependencies and the host runtime.
Better Startup Control
Program.cs gives developers more control over application startup, configuration, dependency injection, and middleware.
Standard .NET Dependency Injection
Developers can use familiar .NET dependency injection patterns instead of relying on the older Functions-specific startup approach.
More Flexibility With .NET
The isolated worker model provides greater flexibility around supported .NET versions because the application runs outside the Functions host process.
Disadvantages and Things to Watch
The migration also has a cost.
Existing applications may require changes across multiple areas:
Function attributes
HTTP types
Dependency injection
Logging
Binding extensions
Serialization
Startup code
Package references
CI/CD configuration
Large applications should therefore not treat the migration as a simple package upgrade.
The biggest practical risk is changing the runtime configuration before the application code is ready. Keep the code migration and Azure configuration change coordinated.
Best Practices
Migrate One Application at a Time
If your organization has many Function Apps, start with one representative application.
Document the changes and use the result as the migration pattern for the remaining applications.
Avoid Unrelated Refactoring
Do not combine the migration with a large architectural rewrite unless necessary.
For example, avoid simultaneously changing:
Database providers
Messaging architecture
Authentication
Serialization libraries
Hosting plans
API contracts
Keeping the migration focused makes failures much easier to diagnose.
Test Every Trigger
A Function App may contain several functions, but testing one HTTP endpoint does not prove that the entire application migrated correctly.
Test each trigger type and each important binding.
Review Package Versions
Do not blindly copy package versions from another application.
Choose versions compatible with the target framework and Functions runtime, and check extension-specific migration requirements.
Use a Staging Slot
For production workloads, a staging slot provides a controlled way to validate the isolated worker application before switching production traffic.
Update Infrastructure Configuration
If the Function App is managed through Terraform, Bicep, ARM templates, or another infrastructure-as-code solution, update the worker runtime configuration there as well.
Otherwise, the next infrastructure deployment could accidentally restore the old configuration.
Final Thoughts
Moving an Azure Functions application from the in-process model to the isolated worker model is a code and deployment migration, not just a runtime setting change.
The most important work is understanding what the existing application depends on. Start with the project file and package references, introduce the isolated worker startup model, update function attributes and bindings, review HTTP and dependency injection code, and then test every trigger.
For production applications, keep the Azure configuration change coordinated with the deployment of the migrated code. Using a staging slot can reduce the risk of exposing the temporary runtime mismatch to users.
The isolated worker model also provides a cleaner foundation for modern .NET applications by giving developers more control over startup, dependency injection, middleware, and application dependencies.
The goal of the migration should not simply be to make the application start again. The goal should be to leave the Function App with a clean project structure, tested bindings, predictable deployment configuration, and a CI/CD pipeline that understands the new execution model.
Join the conversation! Your thoughts help the community grow.