Azure / Azure/azure-functions-openapi-extension
Unable to run the function once the OpenApi extension is added
- Dominant language
- C#
- Stars
- 388
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
OpenApi extension is breaking the function run
Running .net 6 isolated function with Microsoft.NET.Sdk 6.0.8
Following is what we do see in the Debug Console once the Azure Functions Core Tools are launched:
```
[2022-09-27T07:44:17.051Z] Host started (251ms)
[2022-09-27T07:44:17.054Z] Job host started
[2022-09-27T07:44:17.061Z] You must install or update .NET to run this application.
[2022-09-27T07:44:17.063Z] App: C:\Users\C84253\source\repos\adpt-az-func-net\Adpt.FunctionApp\bin\Debug\net6.0\Adpt.FunctionApp.dll
[2022-09-27T07:44:17.065Z] Language Worker Process exited. Pid=19732.
[2022-09-27T07:44:17.067Z] Architecture: x64
[2022-09-27T07:44:17.069Z] C:\Program Files\dotnet\dotnet.exe exited with code -2147450730 (0x80008096). https://aka.ms/dotnet/app-launch-failed.
[2022-09-27T07:44:17.067Z] Failed to start a new language worker for runtime: dotnet-isolated.
[2022-09-27T07:44:17.070Z] Framework: 'Microsoft.NETCore.App', version '6.0.9' (x64)
Functions:
[2022-09-27T07:44:17.075Z] .NET location: C:\Program Files\dotnet\
[2022-09-27T07:44:17.073Z] System.Private.CoreLib: A task was canceled.
```
Once the package is removed and attributes from the code, Azure Functions turns to work as expected.
Environment:
Azure Functions Core Tools
Core Tools Version: 4.0.4785 Commit hash: N/A (64-bit)
Function Runtime Version: 4.10.4.19213
dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.400
Commit: 7771abd614
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.400\
global.json file:
Not found
Host:
Version: 6.0.8
Architecture: x64
Commit: 55fb7ef977
.NET SDKs installed:
3.1.423 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.400 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft Visual Studio Professional 2022 (64-bit) - Current
Version 17.3.3
Project libraries
```
```
Contributor guide
Research direction
No repository files or tests are named. Start by reproducing the failure with the listed .NET 6 isolated project, Core Tools version, and OpenAPI package, then compare it with the package and attributes removed; done means the function runs successfully while the OpenAPI extension remains enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100