Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile Azure Functions (.csx files) on local machine

I am using AzureQueue Trigger template and it would be great to write the functions in my local machine, compile and execute it and then deploy rather than writing it in the azure portal. Is there any way to do it?

Thanks!

like image 809
Krishh Avatar asked Apr 20 '16 04:04

Krishh


People also ask

Can you run Azure functions locally?

Azure Functions Core Tools provides the core runtime and templates for creating functions, which enable local development. Version 2. x supports development on Linux, macOS, and Windows. All environments rely on Core Tools for the local Functions runtime.

How do I run multiple Azure functions locally?

Running multiple Function apps at the same timeAdd a new Function app to your project, then run it without debugging using Debug->Start without debugging. This will spin up the local Azure Functions host and start listening on port 7071 . You will notice this is the same port as the first Functions app.


2 Answers

Krishh,

The answer is yes, but the experience is not great at the moment. Local development is an area we'll be investing more on as we enhance the service, but until we have a true first class local development experience, here's some documentation to get you started with what is currently available:

https://azure.microsoft.com/en-us/documentation/articles/functions-run-local/

The Wiki on the host repository is another great source of information:

https://github.com/Azure/azure-webjobs-sdk-script/wiki

Keep an eye on the docs as we're iterating quickly and will be enhancing the documentation as the experience improves.

like image 79
Fabio Cavalcante Avatar answered Sep 21 '22 07:09

Fabio Cavalcante


This was published just today. Allows you to debug locally as per the article

https://blogs.msdn.microsoft.com/webdev/2016/12/01/visual-studio-tools-for-azure-functions/

  • These tools are offered as a preview release and will have some rough spots and limitations
  • They currently only work with Visual Studio 2015 Update 3 with “Microsoft Web Developer Tools” installed
  • You must have Azure 2.9.6 .NET SDK installed
  • Download and install Visual Studio Tools for Azure Functions
like image 32
frictionlesspulley Avatar answered Sep 23 '22 07:09

frictionlesspulley