1
votes

we have scenario where we want to have a single common shared precompiled dll (class library) across several Function Apps (to have separate domains) but it seems there is no way right now to define function.json manually using VS 2017 (15.3 preview 4) Tools for Azure Functions, please advise.

1
Why do you need to manually define it? It will be generated per function based on attributes. - Mikhail Shilkov
As per my understanding the function.json file is generated as part of the compilation process from the Attributes defined in the Azure Function class but now as we want to use the same Class Library across several Functions App we want to be able to manually add the function.json file to the bin, so that we can choose which functions are part a Function App - akhil

1 Answers

1
votes

You don't need to create function.json manually: your scenario is supported out of the box.

You define multiple Functions in the same assembly, each one decorated with appropriate attributes. Let's say you define Function1 and Function2.

When you publish your assembly as Function App, the tooling will generate 2 function.json files in corresponding folders:

\Function1\function.json
\Function2\function.json

You will be able to see those files in the portal.