Top

References in Azure Functions – custom DLLs – how to


When you want to call methods or objects in C# code, you must declare them with “using” statement. But what if the package is not available? Then you must first make a reference to it. When programming in local environment it just require to upload needed dlls into the project. But what when you are not using desktop IDE, but through the Azure console?

Uploading DLLs to reference them from Azure Function

The process is not complicated at all. But not very intuitive for the first time. Step by step below:

  1. Open App Services in your Azure (or Function Apps, doesn’t matter);
  2. Click your Function’s name;
  3. Click “Platform Features”;
  4. Click “Advanced tools (Kudu)” – will open in a new tab:

    Adding DLLs file to Azure Function

  5. Then “Tools” –> “ZIP Push Deploy”;
  6. Then click the folder with your Function’s name and go to the “bin” folder;
  7. Being there, drag&drop the dll’s you want to make reference to in your Azure Function:

    Adding DLLs file to Azure Function

That’s it. Now you can reference your dlls from your Azure Function:

Referencing dlls from Azure Function

 


Tomasz Poszytek

Hi, I am Tomasz. I am expert in the field of process automation and business solutions' building using Power Platform. I am Microsoft MVP and Nintex vTE.

7 Comments
  • Vivek Jayachandran

    Thank You, this post was helpful.

    December 5, 2018 at 6:56 pm Reply
  • Nilton

    Excelente publicacion me sirvio de mucho.

    September 25, 2019 at 4:24 am Reply
  • Human

    Thank You !

    October 3, 2019 at 12:22 pm Reply
  • Zack Ayeri

    Tomasz thank you for the article, helpful. In VS2022 i have my azure function and works fine. When I deploy (publish) to Azure portal, it rejects bunch of assembly missing…etc.(I use AWSSDK, Sytem.DATA.SqlClient…). any suggestion during publish process. Thank you

    August 31, 2023 at 5:51 pm Reply
    • Tomasz Poszytek

      I’m afraid I don’t have the knowledge to help you with that.

      September 28, 2023 at 7:24 pm Reply

Post a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.