f4f0
f4f0

Reputation: 1

Azure Functions dll referencing

How can I use the "#r" preprocessor directive to reference dlls from another container?

Common #r usage will only search for dlls inside the container on my function app resource group.

Upvotes: 0

Views: 490

Answers (2)

Jose Roberto Araujo
Jose Roberto Araujo

Reputation: 339

As was said, It's better you use ProGet as an universal Package Manager. After this ProGet Environment had been installed and configured with your external .dlls, You'll able to configure all your Azure Functions to look for their dependencies in this ProGet Package manager.

Upvotes: 0

Matt Mason
Matt Mason

Reputation: 2724

I think your goal could be achieved in a better way.

If you want to find your Azure Files account, go to <functionapp>.azurewebsites.net/Envand look for APPSETTING_WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and APPSETTING_WEBSITE_CONTENTSHARE.

To access the reference across functions, create a nuget package for your dll and create a project.json for each function (How can I use NuGet packages in my Azure Functions? / Access Nuget Packages hosted in private Nuget server in Azure Functions)

Using precompiled functions is another good option for managing your references by moving development locally & using normal web app deployment: https://github.com/Azure/azure-webjobs-sdk-script/wiki/Precompiled-functions and https://aka.ms/precompiled-functions.

Upvotes: 1

Related Questions