Azure / Azure/Azure-Functions

Visual Studio template for Azure Functions does not run correctly

Open
#2,550 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

Using Microsoft Visual Studio Enterprise 2022, Version 17.11.0 (VisualStudio.17.Release/17.11.0+35208.52) with the latest Azure Function Core Tools (4.0.5907) and Microsoft.NET.Sdk.Functions (4.4.1) when I create a new Function App based on the Visual Studio Azure Function template, the application generated compiles and runs, but gives a synchronisation error.
(I check Azurite and .NET8.0 as options in the wizard).
When I trigger the function by visiting the url, the logging shows the function is executed , but then gives an error:
[2024-08-14T10:59:43.694Z] Executing ‘DurableFunctionsEntityCSharp_CounterHttpStart’ (Reason=‘This function was programmatically called via the host APIs.’, Id=57f99977-047f-446c-84bf-3e49c9b23008)
[2024-08-14T10:59:43.727Z] Executed ‘DurableFunctionsEntityCSharp_CounterHttpStart’ (Succeeded, Id=57f99977-047f-446c-84bf-3e49c9b23008, Duration=33ms)
[2024-08-14T10:59:43.730Z] An unhandled host error has occurred.
[2024-08-14T10:59:43.730Z] Microsoft.AspNetCore.Server.Kestrel.Core: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.

![Image](https://github.com/user-attachments/assets/dc1d591d-253c-4c31-b407-355f39ed0984)

More details of the issue available here: https://developercommunity.visualstudio.com/t/Visual-Studio-template-for-Azure-Functio/10722427

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.