DEV Community

Sely2k
Sely2k

Posted on

Reference an Azure Function from a shared class library

In this post, I’ll show you a few tips for Azure Function

In an Azure Function Project (OOTB) is possible to declare a function only if the code is present in the "main project" and is not possible to load an Azure function declared in a shared class library.

the solution is modify your .csprj of the main project

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<FunctionsInDependencies>true</FunctionsInDependencies>
</PropertyGroup>
Enter fullscreen mode Exit fullscreen mode

Stack overflow Question

Top comments (0)