Skip to content

Azure Function app not after migration to .Net 10, error "dotnet exited with code 150 (0x96)" #3351

Description

@hesekie11

Description

We are trying to migrate our Azure Function app written in C# from .Net 8 to .Net 10.

The function app builds OK locally.
But once deployed to Azure, there is an error at Azure Function startup:
Microsoft.Azure.WebJobs.Script.Grpc: dotnet exited with code 150 (0x96). https://aka.ms/dotnet/app-launch-failed.

On this page, it states that .Net 10 is a supported version:
https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide?tabs=ihostapplicationbuilder%2Ccode%2Cwindows#supported-versions .

We have also seen #3152.

We are on function runtime version 4, in isolated mode, and on a Flex Consumption Plan.

In the Azure Portal, in the function app's Settings > Configuration > Stack settings, we have selected ".Net 10 Isolated".

Our .csproj file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
	<OutputType>Exe</OutputType>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues" Version="5.5.4" />
	<FrameworkReference Include="Microsoft.AspNetCore.App" />
	<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.51.0" />
	<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.7" />
	<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.1.0" />
	<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="3.0.0" />
	<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.50.0" />
	<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.5" />
	<PackageReference Include="System.Text.Json" Version="10.0.5" />
  </ItemGroup>
	<ItemGroup>
		<Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
	</ItemGroup>
  <ItemGroup>
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
  </ItemGroup>
</Project>

Detailed error from function app logs:
{"prop__operationId":"494b42e5-fee8-4bfe-ad37-c7b0308458f3","ProcessId":"438","HostInstanceId":"febc40b6-dc88-4f0f-8a01-f287b2aa3873","prop__{OriginalFormat}":"A host error has occurred during startup operation '{operationId}'.","LogLevel":"Error","EventId":"515","Category":"Host.Startup","EventName":"ErrorOccurredDuringStartupOpe...

List of traces from startup:

Image

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions