Azure Blob Lifecycle Management Part 2: Set Up Your Local Development Environment
- George Lin
- Oct 30, 2021
- 2 min read
Updated: Dec 3, 2021
Step 1: Download MS Visual Studio 2019 from here:
Step 2: Install Visual Studio 2019
The Azure Functions tools are included in the Azure development workload of Visual Studio 2019 and later versions. The tools let you compile functions in a class library and publish the .dll to Azure and include the Core Tools for local testing. Make sure to select the Azure development workload in your Visual Studio installation as showed in the screenshot below
Do not mix local development with portal development in the same function app. When you create and publish functions from a local project, you should not try to maintain or modify project code in the portal.
Step 3: Install Azure.Storage.Blobs Package
To interact or manipulate Azure Storage resources, blob containers and blob files, the following three .NET classes in Azure Blob Storage client library v12+ for .NET are required for this project.:
BlobServiceClient
BlobContainerClient
BlobClient
It's possible that Visual Studio 2019 may automatically download and install this package on the machine.
Step 4: Install Azure.WebJobs.Extensions.Storage.Blobs Pacakge
Azure WebJobs Storage Blobs client library version 5.0+ for .NET is an extension that provides functionality for accessing Azure Storage Blobs in Azure Functions, for example, Automatic BlobTrigger support.
It's possible that Visual Studio 2019 may automatically download and install this package on the machine.
Step 5: Configure the Local Settings File
The local.settings.json file stores app settings and settings used by local development tools. Settings in the local.settings.json file are used only when you’re running your project locally. Because the local.settings.json may contain secrets, such as connection strings, you should never store it in a remote repository. Tools that support Functions provide ways to synchronize settings in the local.settings.json file with the app settings in the function app to which your project is deployed.
Ref:
Коментарі