Failed to initialize CoreCLR hresult: 0x80004005

Kim Strasser 621 Reputation points

I have created a new local project in VS Code and a new function app in Azure like described in this article:

But I always get this error when I click on Start Debugging:

/Users/name/.nuget/packages/,5): error : Metadata generation failed. Exit code: '137' Error: 'Failed to initialize CoreCLR, HRESULT: 0x80004005' [/Users/name/NewAzureFunctions/NewAzureFunctions.csproj]

I have tried to deploy the new local project to Azure but it is not working:

Bildschirmfoto 2023-04-27 um 13.48.27

I clicked on Deploy Anyway but then I get this message: Failed to deploy path that does not exist: /Users/name/NewAzureFunctions/bin/Release/net6.0/publish

My .csproj file:

<Project Sdk="Microsoft.NET.Sdk">
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.1" />
    <PackageReference Include="PlayFabAllSDK" Version="1.150.230403" />
    <None Update="host.json">
    <None Update="local.settings.json">

Bildschirmfoto 2023-04-28 um 12.55.08

I use Visual Studio Code Version 1.77.3 on a Mac. Why is it not working?

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

1 answer

Sort by: Most helpful
  1. Kim Strasser 621 Reputation points

    It works now. I just needed to install .NET SDK 5.0.408:

    I found the answer here:

    1 person found this answer helpful.
    0 comments No comments