In this post, I’m explaining you how to reference a custom “private” DLL in your Azure Function App. In a previous post, I taught you how to reference DLL using NuGet (https://loicsterckx.wordpress.com/2017/02/17/how-to-retrieve-nugget-packages-in-azure-functions ).
Here it’s about a custom DLL that you want to keep private. A company framework for instance.
I’m assuming in this post that you know “what is” and “how to” use an Azure Function App.
- Create your Azure Function App. Here: LoicBlogDemo
- Create your function inside. Here: MyDemoFunction
- Open Kudu
a. Select your Azure Function App
b. Select “Platform Features“
c. Select “Advanced tools (Kudu)
- On the Kudu’s page, select “Debug console”
- Select “PowerShell”
- In the console, navigate to site -> wwwroot. There you will see the name of your function created in point 2. In my case “MyDemoFunction”, open this folder
- Create a new folder called “bin”
- Upload (drag&drog) your wanted DLL into this bin folder
- You can close Kudu and open your function again, open the run.csx file. At the first line of this file, insert :
Where of course, %MYCUSTOMDLLNAME% equal the name of your uploaded DLL.
You’re now ready to code with your custom DLL.
Happy Function 🙂