Furqan Misarwala
Furqan Misarwala

Reputation: 1891

How to share common code among the Azure functions?

I have common code which is require in other Azure functions, how can I share the common code among the Azure functions?

Upvotes: 7

Views: 11360

Answers (2)

Chris
Chris

Reputation: 3293

If the Functions you are wanting to share code between are under the same Function App you can do the following:

https://stackoverflow.com/a/39541156/2854993

And if they are separate Function Apps, I asked a similar question - see:

Azure Functions - Shared code across Function Apps

Upvotes: 4

rickvdbosch
rickvdbosch

Reputation: 15571

I managed to get shared code to work (or rather: compile) using an Azure Function Tools for Visual Studio project. In case of the screenshot, the shared library is actualy another Function project. I also tried to work with class libraries: those seem to work as well.

Haven't gotten around to deploying it yet, by the way. Running (and debugging) it localy is not an issue, so I guess deploying shouldn't be one either.

Shared library

Upvotes: 0

Related Questions