Extremely Serious

Category: .Net Core

Create a New Azure Function App with .Net Core by Azure Function Core Tools

Requirements

Procedures

  1. Create a directory to house your azure function codes.
  2. Using the command console,  navigate to the newly created directory.
  3. Execute the following command and select dotnet (i.e. usign the arrow keys) and press enter.
    func init

    Wait for the command prompt to come back.

  4. On the new prompt, execute the following command and select the template you want (i.e. using the arrow keys) and press enter.
    func new
  5. Type a name for the function and press enter.

Adding NuGet Package Reference to a Project

Add a NuGet package reference to .Net Core project using the following command:

dotnet add package <PACKAGE_NAME> [-v <VERSION>]

Where:

PACKAGE_NAME The NuGet package to be added
VERSION If the optional -v was used, the target VERSION of the NuGet package.

Example without the -v option

dotnet add package Microsoft.ApplicationInsights

Example with the -v option

dotnet add package Microsoft.ApplicationInsights -v 2.10.0