Azure / azure-functions-core-tools

Command line tools for Azure Functions
MIT License
1.32k stars 434 forks source link

Azure Functions: Create Function Error Message for SDKs #2958

Open VasuBhog opened 2 years ago

VasuBhog commented 2 years ago

OS: macOS Monterey 12.2.1

Visual Studio Code Version: 1.64.2 Commit: f80445acd5a3dadef24aa209168452a3d97cc326 Date: 2022-02-09T22:00:58.347Z (1 wk ago) Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 21.3.0

I have an empty folder in VS Code.

When using VS Code command Azure Functions: Create Function

I get this prompt first - and select Yes: image

I then select C#: image

Once I select C# I see this error: Screen Shot 2022-02-17 at 12 18 24 AM

However, this does not make sense since I have 4 different SDKs installed: Screen Shot 2022-02-17 at 12 18 45 AM

I believe this is something to do with azurecoretools not linking properly to the sdks I have available but I am unable to know why.

v-bbalaiagar commented 2 years ago

Transferring this issue to core tools for further investigation.

michaelpeng36 commented 2 years ago

@v-bbalaiagar Could you clarify what version of the Functions runtime are you trying to use (V3 or V4)? Could you also state what output you receive when running dotnet --version? Is this issue persistent across restarts of VSCode?

michaelpeng36 commented 2 years ago

Could you also try running func new outside of the VSCode terminal and showing us the output?

VasuBhog commented 2 years ago

So I was running core tools v3 and then upgraded to v4 and still had the same issue. I found the only workaround was to do a full restart on my mac. dotnet --version 6.0.100