Azure / azure-functions-vs-build-sdk

MSBuild task for Azure Functions
MIT License
95 stars 64 forks source link

How to build function directories for functions located on a dependent project ? #503

Closed Anthony-Breneliere closed 3 years ago

Anthony-Breneliere commented 3 years ago

Hello,

I have a function project that references several projects that contain azure functions.

FunctionApp.csproj
|-> AzureFunctionsGroup1.csproj
|-> AzureFunctionsGroup2.csproj

When I build FunctionApp.csproj, I have to copy the function directories (that contains the function.json) manually to the output directory, otherwise functions are not found whan I launch the app (0 functions found).

Each function.json file has a link to its projects's assembly with the scriptGile .dll:

{
  "generatedBy": "Microsoft.NET.Sdk.Functions-3.0.11",
  "configurationSource": "attributes",
  "bindings": [
    {
      "type": "httpTrigger",
      "route": "reexport/{checkpointRowKey}",
      "methods": [
        "post"
      ],
      "authLevel": "function",
      "name": "req"
    }
  ],
  "disabled": false,
  "scriptFile": "../bin/AzureFunctionsGroup1.dll",
  "entryPoint": "AzureFunctionsGroup1.MyFuncClass.MyFunc"
}

So how to build Azure functions that are located on project dependencies ?

I have to make it work on the build pipeline on Azure Devops.

Thank you

Anthony-Breneliere commented 3 years ago

the answer is there:

https://github.com/Azure/azure-functions-vs-build-sdk/commit/101e4ced4fa5d489883a45bf28821df42064dd65