Azure Functions and precompiled assemblies
In all our Azure Functions that we have created so far, we have written our code in a method named Run
in the run.csx
. However, there might be some scenarios where you would like to have your own classes and functions run as a start up method hosted on the Azure Functions. In this recipe, you will learn how to integrate your custom class and methods as start ups.
Getting ready...
By default, all the Function apps that you create in VS 2017 are precompiled function. This recipe is developed using VS 2015. Please make sure you install Visual Studio 2015 if you don't have one installed already.
How to do it...
We need to follow the below steps to create and use the precompiled functions:
- Create a class library using Visual Studio
- Create a HTTP function and then make changes to the
Function.json
to integrate the.ddl
file created in the previous step.
Creating a class library using Visual Studio
- Create a new
Class Library
namedPrecompiledFunctions
using Visual...