Reputation: 883
Yesterday There was a windows 11 update and today, every azure function I try to debug in VS2022 (Version 17.7.3), even out of the box Function1 project, Shows error:
"Failed to start a new language worker for runtime: dotnet-isolated. System.Private.CoreLib: A task was canceled."
I tried rebooting and checked the path it does contain C:\Program Files\dotnet
I tried the same thing in VS Code that also worked before and I am getting Failed to find "func: host start" task.
Any help?
Upvotes: 0
Views: 649
Reputation: 8694
Open Terminal in VSCode and run the command:
npm install -g azure-functions-core-tools@4 --unsafe-perm true
.csproj:
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.18.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.13.0" />
</ItemGroup>
local.settings.json:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"
}
}
Run the function:
References:
Failed to start a new language worker for runtime: dotnet-isolated · Issue #1514
Upvotes: 0