Reputation: 1891
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
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
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.
Upvotes: 0