Setup local Azure environment

  • Reading time:2 mins read

Azure Serverless Shopping Cart – Part 1

In the previous part we talked about basic concept of the application. In this part we’ll setup local Azure environment and create the project template. We’ll create the new project based on Azure Functions template. At the end we’ll test if the application is running.

Prerequisites:

  • Visual Studio 17 (or newer) or Visual Studio Code
  • .NET Core 3.x
  • Microsoft Azure Storage Explorer (optional)

In case you’re using Visual Studio 17 you need to install extension for Azure Functions – “Azure Functions and Web Jobs Tools”.

Azure Functions extension for Visual Studio 17

For Visual Studio 19 you need Azure development pack. You can add it from Visual Studio Installer

Visual Studio 19 Azure development toolkit

We’ll use Azure Functions v3 that requires .NET Core 3.x.

For local development we’ll use storage emulator. The storage emulator is available as part of the Microsoft Azure SDK.After

You can access the storage by external tool or built-in tool in VS under View -> Cloud Explorer -> (Local).

Project set up:

We need to create new project. It’s Azure Functions v3 Empty template. If you’re confused just follow the images below:

Project setup 1
Project setup 2

Now we’ll create Durable Function. Right-click on the project -> Add -> Add Azure Function…

Project setup 3

The solution should like this:

Project setup 4And the default template code.

Project setup 5

Press F5 to run the solution. The console will open and you should find this link. Copy and paste to the browser.

Project setup 6

Then copy the value of statusQueryGetUri paste it into the browser. You should see something similar: Project setup 7

Good job! We set-up our project. Let’s move on. In the next part we will setup Entity Framework with Dependency Injection.

 

>> Next part: Azure Functions with Entity Framework and Dependency Injection

Subscribe
Notify of

0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments