Azure Function in VS Code

Diptangshu Karmakar 0 Reputation points
2025-05-21T12:02:08.7833333+00:00

When I am trying to debug the my Azure Function it is ending up in the error. Please image

terminal Logs:

C:\Program Files\dotnet\dotnet.EXE clean /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary

WorkerExtensions succeeded with 1 warning(s) (1.1s)

C:\Users\diptangshu.karmakar\.nuget\packages\microsoft.net.sdk.functions\4.3.0\build\Microsoft.NET.Sdk.Functions.Build.targets(111,5): warning MSB3231: Unable to remove directory "C:\Development\MyTestAzureFunctionApp\obj\Release\net8.0\WorkerExtensions\bin\Debug\net6.0\". Access to the path '\\?\C:\Development\MyTestAzureFunctionApp\obj\Release\net8.0\WorkerExtensions\bin\Debug\net6.0\bin' is denied.

MyTestAzureFunctionApp succeeded with 1 warning(s) (1.8s)

C:\Users\diptangshu.karmakar\.nuget\packages\microsoft.azure.functions.worker.sdk\2.0.0\build\Microsoft.Azure.Functions.Worker.Sdk.targets(242,5): warning MSB3231: Unable to remove directory "C:\Development\MyTestAzureFunctionApp\obj\Debug\net8.0\WorkerExtensions". Access to the path '\\?\C:\Development\MyTestAzureFunctionApp\obj\Debug\net8.0\WorkerExtensions\buildout\bin' is denied.

Build succeeded with 2 warning(s) in 5.1s

  • Terminal will be reused by tasks, press any key to close it.
  • Executing task: C:\Program Files\dotnet\dotnet.EXE build /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary

Restore complete (1.2s)

WorkerExtensions succeeded (9.0s) → obj\Release\net8.0\WorkerExtensions\bin\Debug\net6.0\Microsoft.Azure.Functions.Worker.Extensions.dll

MyTestAzureFunctionApp failed with 1 error(s) (9.7s)

C:\Users\diptangshu.karmakar\.nuget\packages\microsoft.azure.functions.worker.sdk\2.0.0\build\Microsoft.Azure.Functions.Worker.Sdk.targets(136,5): error MSB4018:

  The "GenerateFunctionMetadata" task failed unexpectedly.

  System.IO.IOException: Access to the path '\\?\C:\Development\MyTestAzureFunctionApp\obj\Debug\net8.0\W

  orkerExtensions\buildout\bin' is denied.

     at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean

   topLevel)

     at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)

     at Microsoft.Azure.Functions.Worker.Sdk.ExtensionsCsprojGenerator.RecreateDirectory(String directory

  Path) in D:\a\_work\1\s\sdk\Sdk\ExtensionsCsprojGenerator.cs:line 54

     at Microsoft.Azure.Functions.Worker.Sdk.ExtensionsCsprojGenerator.Generate() in D:\a\_work\1\s\sdk\S

  dk\ExtensionsCsprojGenerator.cs:line 46

     at Microsoft.Azure.Functions.Worker.Sdk.Tasks.GenerateFunctionMetadata.Execute() in D:\a\_work\1\s\s

  dk\Sdk\Tasks\GenerateFunctionMetadata.cs:line 53

     at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()

     at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, 

  TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExe

  cuteTask)

Build failed with 1 error(s) in 11.6s

  • The terminal process "C:\Program Files\dotnet\dotnet.EXE 'build', '/property:GenerateFullPaths=true', '/consoleloggerparameters:NoSummary'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

Using the below launch.json configuration

User's image

Kindly help me with the solution.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ranashekar Guda 2,670 Reputation points Microsoft External Staff Moderator
    2025-05-22T21:13:09.5566667+00:00

    Hello @Diptangshu Karmakar,
    System.IO.IOException: Access to the path '\?\C:\Development\MyTestAzureFunctionApp\obj\Debug\net8.0\W   orkerExtensions\buildout\bin' is denied.

    Means you have a network configuration which is blocking access to the Azure Storage Account on which your Azure Function is hosted.

    So could you please check the accessibility to storage account from function app.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.