5

I added a Azure Function project to my VS Code solution (has other projects) but I'm not receiving any intellisense support. Is this normal, is there no intellisense support for Azure functions?

Do I need to add something, somewhere to get intellisense for these types of projects?

FYI - Maybe it's the way I added the Azure Function, it was added as a project to a solution. And I have other C# projects in the solution that are working fine. If I create a new Azure Function project on it's own, itellisense works fine, just not in a solution with other projects.

Using: C# VS Code latest version .Net 5 latest Azure Function tools lib C# extension v1.23.11

UPDATE - looks like I'm getting some errors in the OmniSharp log when checking for intelliense on a line of code in the Azure Function.

Received response for /v2/getcodeactions but could not find request. [info]: OmniSharp.OmniSharpWorkspace Miscellaneous file: /Users/charlespareto/TestClone1/yogabandy2020/Azure/Functions/ServiceBusQueueTrigger.cs added to workspace Received response for /v2/codestructure but could not find request. Received response for /quickinfo but could not find request. Received response for /v2/codestructure but could not find request.

oguz ismail
  • 1
  • 16
  • 47
  • 69
chuckd
  • 13,460
  • 29
  • 152
  • 331

4 Answers4

3

I found the answer -

I had to add the .csproj to the .sln file in order for OmniSharp to recognize it.

chuckd
  • 13,460
  • 29
  • 152
  • 331
  • I opened `.csproj` with Visual Studio for Mac and after restarting Visual Studio Code I got IntelliSense. It seems an `.sln` is required, and it wasn't given when creating the Azure Function – lolelo Oct 02 '21 at 13:48
  • Thank you so much. This was driving me crazy. I hadn't added the Functions project to the solution. duh. – JVNick May 17 '22 at 17:00
0

On my side it is no problem:

enter image description here

Maybe you need to install related modules. And make sure you install the python plugin of VS Code.

Cindy Pau
  • 13,085
  • 1
  • 15
  • 27
0

I had this issue as well, and the .csproj was already added to the .sln. Restarting OmniSharp fixed it for me. Steps:

Open Command Palette (cmd+shift+p / ctrl+shift+p) -> type OmniSharp -> select OmniSharp: Restart OmniSharp

Hope this helps

JakeD
  • 407
  • 2
  • 7
  • 19
0

With a multi-root workspace configuration, I was able to solve this by changing to the new Azure Functions project in the OmniSharp configuration. I am not using a .sln file.

Open Command Palette (CTRL + SHIFT + P / CMD + SHIFT + P) > OmniSharp: Select Project > (Choose the new project)

Scott Kearney
  • 173
  • 10