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:
- 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()
andUseFunctionsWorker()
instead ofFunctionStartup
or in-process patterns. - You should not be referencing
Microsoft.NET.Sdk.Functions
— onlyMicrosoft.Azure.Functions.Worker
.
- Project SDK should be:
- Remove any
bin
/obj
folders- Leftover build artifacts from the in-process model can confuse the deployment:
dotnet clean rm -rf bin obj
- Leftover build artifacts from the in-process model can confuse the deployment:
- 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 theMicrosoft.Azure.WebJobs.*
orMicrosoft.Azure.Functions.Extensions
.
- Ensure that you're using the
- 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>
- In
- Set
EnableDefaultContentItems
totrue
or remove it- You currently have:
This might prevent required function metadata files from being included in the build output. Try either removing this or setting it to<EnableDefaultContentItems>false</EnableDefaultContentItems>
true
.
- You currently have:
- 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.
- Make sure the
- 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.
- Clean and rebuild:
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