Ofer Gal
Ofer Gal

Reputation: 883

unable to attach. process ’ c:\program files\dotnet\dotnet.exe' is not running on xxx

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."

There is also a message box enter image description here

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

Answers (1)

Pravallika KV
Pravallika KV

Reputation: 8694

Open Terminal in VSCode and run the command:

npm install -g azure-functions-core-tools@4 --unsafe-perm true

enter image description here

  • Check if there are any updates to be done.
  • Create a new function project with the below package versions:

.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:

enter image description here

References:

Failed to start a new language worker for runtime: dotnet-isolated · Issue #1514

Upvotes: 0

Related Questions