It works now. I just needed to install .NET SDK 5.0.408: https://dotnet.microsoft.com/en-us/download/dotnet/5.0
I found the answer here: https://github.com/Azure/azure-functions-core-tools/issues/2876
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have created a new local project in VS Code and a new function app in Azure like described in this article: https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-csharp?pivots=programming-language-csharp&tabs=in-process
But I always get this error when I click on Start Debugging:
/Users/name/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/4.0.1/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(37,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:
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">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.1" />
<PackageReference Include="PlayFabAllSDK" Version="1.150.230403" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
I use Visual Studio Code Version 1.77.3 on a Mac. Why is it not working?
It works now. I just needed to install .NET SDK 5.0.408: https://dotnet.microsoft.com/en-us/download/dotnet/5.0
I found the answer here: https://github.com/Azure/azure-functions-core-tools/issues/2876