UPDATE: Apart from the below approach, while not documented yet. You can set the FunctionsInDependencies
property in your csproj
file. This was mentioned in this SO thread.
---
Functions are loaded by reading function.json
files. These are generated during compilation even for C# functions. I have attached one that I've generated by running a release build in a fresh function app
dotnet build -c release
Here is the same for reference
{
"generatedBy": "Microsoft.NET.Sdk.Functions-1.0.31",
"configurationSource": "attributes",
"bindings": [
{
"type": "httpTrigger",
"methods": [
"get",
"post"
],
"authLevel": "function",
"name": "req"
}
],
"disabled": false,
"scriptFile": "../bin/funk-csharp.dll",
"entryPoint": "funk_csharp.HttpTrigger.Run"
}
A similar file with the appropriate scriptFile
and entryPoint
values should do the trick. Here is how the release folder structure looks like