> ## Content Index
> Fetch the complete content index at: https://codetraveler.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# Updating to Azure Functions v3 in Visual Studio
- URL: https://codetraveler.io/2020/02/12/visual-studio-for-mac-updating-to-azure-functions-v3/
- Published: 2020-02-12T23:50:41.000Z
- Updated: 2020-06-30T18:58:03.000Z
- Author: Brandon Minnick
- Tags: azure functions, visual studio, visual studio for mac, .NET Core, .NET Core 3.0, .NET Core 3.1, azure, functions, serverless, .NET Standard 2.1

Azure Functions v3 was recently [released on 09 December 2019](https://azure.microsoft.com/updates/announcing-go-live-release-for-azure-functions-v3?WT.mc%5Fid=functionsv3-codetraveler-bramin&ref=codetraveler.io) with support for [.NET Core 3](https://docs.microsoft.com/dotnet/core/whats-new/dotnet-core-3-0?WT.mc%5Fid=functionsv3-codetraveler-bramin&ref=codetraveler.io) and [.NET Standard 2.1](https://devblogs.microsoft.com/dotnet/announcing-net-standard-2-1?WT.mc%5Fid=functionsv3-codetraveler-bramin&ref=codetraveler.io). Here's how to install the new runtime in Visual Studio and Visual Studio for Mac.

## 1\. Install .NET Core 3

Azure Functions v3 runs on .NET Core 3\. 

To install .NET Core 3, visit [Download .NET Core](https://dotnet.microsoft.com/download/dotnet-core?WT.mc%5Fid=functionsv3-codetraveler-bramin&ref=codetraveler.io). 

I recommend selecting the latest `LTS` version. `LTS` stands for `Long Term Support`, meaning that Microsoft is committed to supporting this specific version of .NET Core with bug fixes for approximately 2-3 years.

As of today, the current `LTS` version of .NET Core is [.NET Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/3.1?WT.mc%5Fid=functionsv3-codetraveler-bramin&ref=codetraveler.io).

## 2\. Update the CSPROJ

Let's ensure our `csproj` file has been updated for Azure Functions v3\. 

We'll need to set the following three things:

- [**Target Framework**](https://docs.microsoft.com/dotnet/standard/frameworks?WT.mc%5Fid=functionsv3-codetraveler-bramin&ref=codetraveler.io) is `netcoreapp3.1` (or higher)
- [**Microsoft.NET.Sdk.Functions** NuGet Package](https://www.nuget.org/packages/Microsoft.NET.Sdk.Functions?ref=codetraveler.io) is v3.0.1 (or higher)
- **AzureFunctionsVersion** is `v3`

Here is an example from my GitTrends app: [https://github.com/brminnick/GitTrends/blob/master/GitTrends.Functions/GitTrends.Functions.csproj](https://github.com/brminnick/GitTrends/blob/master/GitTrends.Functions/GitTrends.Functions.csproj?ref=codetraveler.io)

```xml
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>netcoreapp3.1</TargetFramework>
        <AzureFunctionsVersion>v3</AzureFunctionsVersion>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.1" />
    </ItemGroup>
    <ItemGroup>
        <None Update="host.json">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="local.settings.json">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
            <CopyToPublishDirectory>Never</CopyToPublishDirectory>
        </None>
    </ItemGroup>
</Project>

```

## 3a. (Visual Studio) Update Azure Functions Runtime

**Note:** If you're using Visual Studio for Mac, skip to the next section

Let's now install the Azure Functions Runtime for [Visual Studio 2019](https://visualstudio.microsoft.com/vs?WT.mc%5Fid=functionsv3-codetraveler-bramin&ref=codetraveler.io)

1. In [**Visual Studio**](https://visualstudio.microsoft.com/vs?WT.mc%5Fid=functionsv3-codetraveler-bramin&ref=codetraveler.io), select **Create a new project**

![](https://storage.ghost.io/c/dc/c2/dcc2e43e-24f8-46bb-a899-9c446f3ef794/content/images/2020/02/Screen-Shot-2020-02-12-at-3.31.20-PM.png)

Visual Studio, Create New Project

2\. In the **Create a new project** window, in the search bar, enter `Functions`

3\. In the **Create a new project** window, in the search results, select **Azure Functions**

4\. In the **Create a new project** window, select **Next**

![](https://storage.ghost.io/c/dc/c2/dcc2e43e-24f8-46bb-a899-9c446f3ef794/content/images/2020/02/Screen-Shot-2020-02-12-at-3.31.35-PM.png)

Create a new Azure Functions Project

5\. In the **Create a new Azure Functions Application** window, stand by while it is **"Getting information about the latest function tools..."**

![](https://storage.ghost.io/c/dc/c2/dcc2e43e-24f8-46bb-a899-9c446f3ef794/content/images/2020/02/Screen-Shot-2020-02-12-at-3.31.53-PM.png)

Download latest Azure Functions Runtime

6\. In the **Create a new Azure Functions Application** window, once the new tools have been downloaded, click **Refresh**

![](https://storage.ghost.io/c/dc/c2/dcc2e43e-24f8-46bb-a899-9c446f3ef794/content/images/2020/02/Screen-Shot-2020-02-12-at-3.33.24-PM.png)

Click Refresh

## 3b. (Visual Studio for Mac) Update Azure Functions Runtime

**Note:** If you are using Visual Studio on PC, you may skip this step

Let's now install the Azure Functions Runtime for [Visual Studio for Mac](https://visualstudio.microsoft.com/vs/mac?WT.mc%5Fid=functionsv3-codetraveler-bramin&ref=codetraveler.io)

1. In the [Visual Studio for Mac](https://visualstudio.microsoft.com/vs/mac/?ref=codetraveler.io) window, select **New**

![](https://storage.ghost.io/c/dc/c2/dcc2e43e-24f8-46bb-a899-9c446f3ef794/content/images/2020/02/Screen-Shot-2020-02-12-at-3.42.44-PM.png)

Visual Studio for Mac Create new Project

2\. In the **New Project** window, on the left-hand menu, under **Cloud**, select **General**

![](https://storage.ghost.io/c/dc/c2/dcc2e43e-24f8-46bb-a899-9c446f3ef794/content/images/2020/02/Screen-Shot-2020-02-12-at-2.23.18-PM.png)

Create New Azure Functions Project

3\. In the **Configure you Azure Functions Project** window, standby until it finishes installing the Azure Functions components

![](https://storage.ghost.io/c/dc/c2/dcc2e43e-24f8-46bb-a899-9c446f3ef794/content/images/2020/02/Screen-Shot-2020-02-12-at-2.23.27-PM.png)

Update Runtime

## 4\. Conclusion 

Updating to Azure Functions v3 requires a couple steps:

- Installing .NET Core 3
- Updating our `csproj`
- Updating Visual Studio's Azure Functions Runtime

If you'd like to see an existing Azure Functions project using v3, feel free to check the Azure Functions Backend in my GitTrends app: [https://github.com/brminnick/GitTrends/tree/master/GitTrends.Functions](https://github.com/brminnick/GitTrends/tree/master/GitTrends.Functions?ref=codetraveler.io)

![](https://storage.ghost.io/c/dc/c2/dcc2e43e-24f8-46bb-a899-9c446f3ef794/content/images/2020/02/EQm9wkaUYAADq2V-1.jpeg)