Azure Function Isolated 6.0 Visual Studio 2022 Only Debug Once

Brett McDonald 1 Reputation point
2021-09-19T21:03:30.063+00:00

I can run once and debug my Azure Functions. But when I stop and rerun I get the below for all the functions. I can stop and restart Visual Studio 2022 no effect. I have to completely reboot and then the debug will work. Till I try to restart. This has worked fine until today. I can't figure out what is hanging.

[2021-09-19T20:44:02.211Z] Received FunctionLoadResponse for functionId:11617590-59d2-4b19-8fbf-5922692e7dbb
[2021-09-19T20:44:02.212Z] Worker failed to function id 11617590-59d2-4b19-8fbf-5922692e7dbb.
[2021-09-19T20:44:02.213Z] Result: Failure
Exception: System.InvalidOperationException: Unable to load Function 'RenderSwaggerUI'. A function with the id '11617590-59d2-4b19-8fbf-5922692e7dbb' name already exists.
[2021-09-19T20:44:02.214Z] at Microsoft.Azure.Functions.Worker.FunctionsApplication.LoadFunction(FunctionDefinition definition) in D:\a\1\s\src\DotNetWorker.Core\FunctionsApplication.cs:line 53
[2021-09-19T20:44:02.214Z] at Microsoft.Azure.Functions.Worker.GrpcWorker.FunctionLoadRequestHandler(FunctionLoadRequest request, IFunctionsApplication application, IMethodInfoLocator methodInfoLocator) in D:\a\1\s\src\DotNetWorker.Grpc\GrpcWorker.cs:line 243
Stack: at Microsoft.Azure.Functions.Worker.FunctionsApplication.LoadFunction(FunctionDefinition definition) in D:\a\1\s\src\DotNetWorker.Core\FunctionsApplication.cs:line 53
[2021-09-19T20:44:02.215Z] at Microsoft.Azure.Functions.Worker.GrpcWorker.FunctionLoadRequestHandler(FunctionLoadRequest request, IFunctionsApplication application, IMethodInfoLocator methodInfoLocator) in D:\a\1\s\src\DotNetWorker.Grpc\GrpcWorker.cs:line 243.
[2021-09-19T20:44:03.541Z] Host lock lease acquired by instance ID '00000000000000000000000088777BF1'.

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

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 68,471 Reputation points
    2021-09-20T03:47:05.957+00:00

    @Brett McDonald .NET 6.0 on Azure Functions is currently offered as an early preview and there is no official support. Please verify if Azure Functions V4 is correctly installed. If you are still facing the issue then I will suggest you to open a issue in here so the team can look into this and confirm if this is function or visual studio 2022 preview issue.

    For testing you can try out using this environment but for production I will not suggest to use it untill the service is GA.

    Announcement : https://techcommunity.microsoft.com/t5/apps-on-azure/what-s-new-with-net-on-azure-functions-june-2021/ba-p/2428669

    0 comments No comments