Creating the function
Let's take a look at the following steps to create the function:
- In
Solution Explorer
, right-click the project, chooseAdd
->New Item
->Azure Function
, and enterScoreText
in the name. This will be the name of the.cs
file that defines the function. - In the next dialog, fill the following parameters:
Function type
:HttpTrigger
AccessRights
:Anonymous
FunctionName
:ScoreText

- Click on
Create
.
You will see the ScoreText.cs
file appear in the project tree.
Running the function locally
The function code is provided next. The auto-generated code implements the same behavior as we've seen in the HelloWorld
function created online, however, you will notice a few differences in code. The differences exist because the online function was a C# script ( CSX ) based function.
The Visual Studio "precompiled" function template has references to a number of system libraries and the Azure.WebJobs
libraries, and the function's Run
method is annotated with attributes. The FunctionName
attribute...