5

I'm playing around with Azure Functions but I've noticed VS 2015 doesn't provide intellisense for .csx files.

Any idea how to fix this?

OmG
  • 18,337
  • 10
  • 57
  • 90

3 Answers3

1

This isn't an issue with your configuration. IntelliSense support with csx is limited and will be improved in future tooling releases (also targeting VS Code and the portal).

Fabio Cavalcante
  • 12,328
  • 3
  • 35
  • 43
1

Follow this blog post Publishing a .NET class library as a Function App and don't look back. Full C#, (not .csx.), C# 7 (if using VS2017), and full intellisense and debugging.

Basically the approach is instead of creating a Function Project (in VS2015 only), instead create an ASP.NET project and use the Azure Function CLI to create the actual functions. Then you are not dealing with .CSX files which have poor support within the VS editor.

  1. From the New Project dialog, choose ASP.NET Web Application (.NET Framework) with the empty site template.
  2. Open the project properties. In the Web tab, choose Start External Program
  3. For the program path, enter the path to func.exe for the Azure Functions CLI. If you’ve installed the Visual Studio Functions Tooling, the path will look something like C:\Users\USERNAME\AppData\Local\Azure.Functions.Cli\1.0.0-beta.93\func.exe If you’ve installed the Azure Functions CLI through NPM, the path will be something like C:\Users\USERNAME\AppData\Roaming\npm\node_modules\azure-functions-cli\bin\func.exe

  4. For Command line arguments, set host start For Working directory, specify the root of the web project on your machine (unfortunately, this isn’t set automatically.)

flyte
  • 1,242
  • 11
  • 18
0

One solution is to develop your Function as a Precompiled function as explained here: https://github.com/Azure/azure-webjobs-sdk-script/wiki/Precompiled-functions

I got fed up very quickly of the limited intellisense.

DavidGouge
  • 4,583
  • 6
  • 34
  • 46