Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Functions Visual Studio 2015 intellisense

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?

like image 743
Federico Degrandis Avatar asked Oct 30 '22 19:10

Federico Degrandis


2 Answers

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).

like image 152
Fabio Cavalcante Avatar answered Nov 11 '22 16:11

Fabio Cavalcante


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.)

like image 32
flyte Avatar answered Nov 11 '22 16:11

flyte