visual studio code - Azure Functions HTTPTrigger running locally with VSCode weird bug but API still works .NET - Stack Overflow
- c - Solaris 10 make Error code 1 Fatal Error when trying to build python 2.7.16 - Stack Overflow 推荐度:
- javascript - How to dismiss a phonegap notification programmatically - Stack Overflow 推荐度:
- javascript - Get the JSON objects that are not present in another array - Stack Overflow 推荐度:
- javascript - VS 2015 Angular 2 import modules cannot be resolved - Stack Overflow 推荐度:
- javascript - Type 'undefined' is not assignable to type 'menuItemProps[]' - Stack Overflow 推荐度:
- 相关推荐
To reproduce the problem I'm encountering, it's quite trivial.
- Go to VSCode.
- Do >Azure Functions: Create new project
- Use .NET 8.0 Isolated LTS
- Use the HTTP trigger template
- Then just click Enter
- Run the app with the "Play" button on VSCode (see image below):
I have this in the Output
tab:
Activating task providers dotnet
Error: there is no registered task type 'func C:\Users\[REDACTED]\MyFolder\bin\Debug\net8.0'. Did you miss installing an extension that provides a corresponding task provider?
Activating task providers all
Error: there is no registered task type 'func C:\Users\[REDACTED]\MyFolder\bin\Debug\net8.0'. Did you miss installing an extension that provides a corresponding task provider?
In the terminal
tab, I have:
Functions:
HttpTrigger1: [GET,POST] http://localhost:7228/api/HttpTrigger1
And I can do a POST request there. So, everything seems to work correctly. However, I have this really weird error message, and I don't like having error messages I don't understand even though everything works.
What seems to be the problem?
Additional details about my VSCode:
Version: 1.96.2 (user setup)
Commit: fabdb6a30b49f79a7aba0f2ad9df9b399473380f
Date: 2024-12-19T10:22:47.216Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631
I have 8.0.401 [C:\Program Files\dotnet\sdk] and the Azure Functions Core Tools (4.0.6610) installed:
Screenshot of the Visual Studio "Terminal" tab (and I can do POST request to that localhost address):
Screenshot of the Visual Studio "output" Tab:
I have the Azure Functions extension installed.
To reproduce the problem I'm encountering, it's quite trivial.
- Go to VSCode.
- Do >Azure Functions: Create new project
- Use .NET 8.0 Isolated LTS
- Use the HTTP trigger template
- Then just click Enter
- Run the app with the "Play" button on VSCode (see image below):
I have this in the Output
tab:
Activating task providers dotnet
Error: there is no registered task type 'func C:\Users\[REDACTED]\MyFolder\bin\Debug\net8.0'. Did you miss installing an extension that provides a corresponding task provider?
Activating task providers all
Error: there is no registered task type 'func C:\Users\[REDACTED]\MyFolder\bin\Debug\net8.0'. Did you miss installing an extension that provides a corresponding task provider?
In the terminal
tab, I have:
Functions:
HttpTrigger1: [GET,POST] http://localhost:7228/api/HttpTrigger1
And I can do a POST request there. So, everything seems to work correctly. However, I have this really weird error message, and I don't like having error messages I don't understand even though everything works.
What seems to be the problem?
Additional details about my VSCode:
Version: 1.96.2 (user setup)
Commit: fabdb6a30b49f79a7aba0f2ad9df9b399473380f
Date: 2024-12-19T10:22:47.216Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631
I have 8.0.401 [C:\Program Files\dotnet\sdk] and the Azure Functions Core Tools (4.0.6610) installed:
Screenshot of the Visual Studio "Terminal" tab (and I can do POST request to that localhost address):
Screenshot of the Visual Studio "output" Tab:
I have the Azure Functions extension installed.
Share Improve this question edited Dec 24, 2024 at 8:35 FluidMechanics Potential Flows asked Dec 23, 2024 at 19:25 FluidMechanics Potential FlowsFluidMechanics Potential Flows 6161 gold badge22 silver badges42 bronze badges 1 |1 Answer
Reset to default 0The error indicates that Azure Functions is unable to recognize the task type 'func C:\Users\[REDACTED]\MyFolder\bin\Debug\net8.0'
. This could be caused by missing extensions.
- You can check which versions of .NET SDK are installed by running the command
dotnet --list-sdks
- Ensure that you have the .NET 8 SDK installed.
- If you’re using the Azure Functions Core Tools locally, make sure should be up to date. You can update it using this command:
npm install -g azure-functions-core-tools@4
I have created the Http trigger function with runtime stack .NET 8.0 isolated in visual studio code followed by same instructions which you mentioned. The function ran successfully. check below:
.cs proj:
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>New_folder__4_</RootNamespace>
</PropertyGroup>
Output:
- 苹果安卓交锋:开放做强生态链
- 网络监控火速普及 产品布局有待调整
- java - Omit super class fields in spring doc open api docs - Stack Overflow
- Python Selenium Error - Sandbox cannot access executable - Stack Overflow
- What is the correct TypeScript type for the `children` property in Svelte 5? - Stack Overflow
- graphdb - vector embedding on ontotext similarity plugin - Stack Overflow
- .net - Visual Studio shows "The application is in break mode" instead of underlining the problematic code - St
- azure managed identity - Durable Function error "This request is not authorized to perform this operation" - S
- javascript - MineFlayer bot Error: read ECONNRESET as I was trying to log it in to my server - Stack Overflow
- python - aiohttp showing 403 error but requests.get giving 200 response - Stack Overflow
- reactjs - How to change output directory of wxt extension framework - Stack Overflow
- python - How to display only the tags translated into the corresponding language on a multilingual site? - Stack Overflow
- react native - Views are still shifted when the keyboard opens, even though they are not wrapped in a KeyboardAvoidingView - Sta
- python - Why do I get AttributeError: module 'tensorflow.keras.backend' has no attribute 'placeholder&am
- amazon web services - Update a view attribute in aws connect - Stack Overflow
- amazon web services - Python boto3: download files from s3 to local only if there are differences between s3 files and local one
- javascript - useState rerenders bindings increment when key added to object but not removed - Stack Overflow
npm install -g azure-functions-core-tools@4 --unsafe-perm true
– Pavan Commented Dec 24, 2024 at 2:24