Azure function template for Visual Studio 2017 does not have files - run.csx or project.json

I am using Visual Studio 2017 (2) preview to create Azure Function. The template generated for it is very different from what I get in Visual Studio 2015.

The Visual Studio 2017 template creates a .cs file for the function, and the structure of the template is as follows:

Azure Function Studio Template Structure

All functions are created as a separate .cs file, and there are no run.csx, project.json or function.json files, because of which I can not specify the dependencies and settings of specific functions

If we see an earlier template (see image below) with Visual Studio 2015, it well represents the folders and files available on Azure Portal. It has functions in a separate folder with all .json and .csx files. This folder structure helps in separating files associated with a particular function (which does not match the VS 2017 template)

Azure Function Studio 2015 template structure

In VS 2017, I want to specify function-dependent dependencies and binding settings by adding project.json and function.json. Please let me know how to achieve this?

+7
visual-studio-2017 azure azure-functions
source share
1 answer

It is intended. The Azure function group has changed the way you develop and deploy functional applications in Visual Studio 2017. Now it is basically a compiled class library in which functions are static methods with corresponding attributes.

You no longer need to edit function.json manually; use the WebJob SDK attributes instead. Package management is done in the usual .NET way through NuGet packages.

The "old way" still works on the Azure portal for rapid prototyping and experimentation, but Visual Studio no longer supports it.

+9
source share

All Articles