Well, here we will discuss the Azure Function Folder Structure. It would be best to understand it before creating Azure Functions.
Table of Contents
Azure Function Folder Structure
Once you create an Azure Function Project using Visual Studio 2019, You will get the Azure Function Project Structure below.

If you click on the Project name, i.e., TestAzureFunction, in my case, that is the .csproj file that contains all the configurations for your Azure Function project. This file contains the code below
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.36" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
Dependencies contain all the packages(DLLs) and SDKs needed for your Azure Function Project. You will expand that you can see many dlls referred to your Azure Function Project. Below are a few of them
Microsoft.NET.Sdk.Functions
Microsoft.Azure.Webjobs
NewtonSoft.jsonFunction1.cs file is the main class file that contains the Azure Function code. If you want to modify the Azure Function logic based on your business requirement, then you must modify the Azure function code in this file.
The file will look like below

The next file is the host.json file, which contains all the settings or configuration options that affect all the Azure functions within that Azure Function App. If you want to apply any configuration property changes, this is the file you must change.
The default host.json file contains the below code
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
}
}
Next, coming to the local.settings.json file, you can keep the application settings value that we get from the Azure Portal. It contains the configurations below
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}One important thing to note down here is, local.settings.json file changes are for local use only, you can consider them for development purposes only. Once you will deploy the Azure Function to Azure. You will not get the reference for this file. This is very important to remember.
If you are referring to any of the application settings from the local.settings.json file, then Once you deploy the Azure Function to the Azure Portal, Make sure to do the same application settings changes manually in the Azure Portal since you will not get the reference of this file in Azure or else your Azure Function will not work properly.
Final Thoughts
In this Azure article, we discussed Azure Functions Folder Structure. Thanks for reading this article !!!

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
