Migrate Azure function from in-process model to isolated model

Priya Patel 0 Reputation points
2025-07-04T10:40:32.39+00:00

I have an Azure function app running on the in-process model. Now I'm migrating it to the isolated model. I did the code change required and changed the FUNCTIONS_WORKER_RUNTIME to dotnet-isolated and .NET Version change to .NET Isolated.

Project cs file has Sdk="Microsoft.NET.Sdk.Worker" and property group is as below

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

<PropertyGroup>

<TargetFramework>net8.0</TargetFramework>

  <AzureFunctionsVersion>v4</AzureFunctionsVersion>

  <OutputType>Exe</OutputType>

  <Nullable>enable</Nullable>

  <ImplicitUsings>enable</ImplicitUsings>

  <EnableDefaultContentItems>false</EnableDefaultContentItems>

<FunctionsWorkerRuntime>dotnet-isolated</FunctionsWorkerRuntime>

</PropertyGroup>

And when deployed on azure it shows a warning.
"The 'FUNCTIONS_WORKER_RUNTIME' is set to 'dotnet-isolated', which does not match the worker runtime metadata found in the deployed function app artifacts. The deployed artifacts are for 'dotnet'."

Kindly share suggestions.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,938 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 50,895 Reputation points MVP Volunteer Moderator
    2025-07-04T11:11:27.7833333+00:00

    The warning you're seeing means that Azure is detecting in-process (dotnet) function artifacts, even though your environment variable FUNCTIONS_WORKER_RUNTIME is set to dotnet-isolated. To fix this, try the following:

    1. Ensure your project is fully converted to isolated
      • Project SDK should be:
             <Project Sdk="Microsoft.NET.Sdk.Worker">
        
      • Confirm that the entry point uses Host.CreateDefaultBuilder() and UseFunctionsWorker() instead of FunctionStartup or in-process patterns.
      • You should not be referencing Microsoft.NET.Sdk.Functions — only Microsoft.Azure.Functions.Worker.
    2. Remove any bin / obj folders
      • Leftover build artifacts from the in-process model can confuse the deployment:
             dotnet clean
             rm -rf bin obj
        
    3. Verify the function bindings are compatible
      • Ensure that you're using the Microsoft.Azure.Functions.Worker.* packages for bindings (e.g. Http, Timer, etc.), not the Microsoft.Azure.WebJobs.* or Microsoft.Azure.Functions.Extensions.
    4. Check dependencies
      • In .csproj, dependencies should look something like this:
             <ItemGroup>
               <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.16.0" />
               <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.16.0" OutputItemType="Analyzer" />
               <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.1.0" />
             </ItemGroup>
        
    5. Set EnableDefaultContentItems to true or remove it
      • You currently have:
             <EnableDefaultContentItems>false</EnableDefaultContentItems>
        
        This might prevent required function metadata files from being included in the build output. Try either removing this or setting it to true.
    6. Check deployment artifacts
      • Make sure the function.json files being generated are from isolated worker functions. They should be auto-generated at build time by the worker SDK, and not manually included.
    7. Perform a fresh publish
      • Clean and rebuild:
             dotnet build
        
      • Publish locally to verify outputs:
             dotnet publish -c Release -o ./publish
        
      • Deploy only from that publish folder. If you're using Azure DevOps, GitHub Actions, or any CI/CD, ensure it is not reusing previous build artifacts or pointing to a dotnet-style function app.

    If this doesn't help, try redeploying into a fresh Function App (or delete the existing one and recreate it). Sometimes stale runtime metadata can cause Azure to interpret your deployment incorrectly.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.