About

How to build and deploy an Azure Function with VB.NET and Framework 4.8 in 10 steps

Published on 8th of May, 2020
Last edit: August the 25th
You may choose to
avoid the "dirty work" -> clone my GitHub repo and skip to the last step
or
follow the instructions below.

New -> Ready made project templates with web deploy for Visual Studio (versions 2012, 2013, 2015, 2017 and 2019) are available here.
 


 1. Using VS2015 (should work with other VS versions as well), create a Class Library, name it "Function Test VB"

 2. Rename Class1.vb to Function1.vb in Solution Explorer

 3. In Solution Explorer, right-click the project > Manage NuGet packages... and install the following four packages:

    Microsoft.Azure.webjobs version 2.2.0
    Microsoft.Azure.webjobs.extensions version 2.2.0
    Microsoft.Azure.webjobs.extensions.http version 1.1.0
    System.ValueTuple version 4.3.0

 4. In Solution Explorer, expand References and select all items inside

 4a. Hit the F4 key to open properties and set the Copy Local attribute to False

 5. Paste this code into Function1.vb (this is the converted output of the default C# code for Azure Function by Telerik's C to VB converter):

 6. Create a file named host.json in root folder. It should contain nothing but empty brackets ( {} )

 7. Add a folder named Function1 and in that folder, create a file function.json, which should look something like this:

 8. Build the solution

 9. Zip-deploy to your Azure Function runtime version ~1 and there's your perfect solution!