How do I manage to create multiple "Function Apps" in Visual Studio? If I create a new project and chose "Azure functions" (equal to Function Apps in the portal). In the project it's possible to create multiple "Azure function". Each one is then visible under my "function app" after I published. But what if I want multiple function app's? Do I need to create a new project in my solution for each one? Would be nice if it was possible to solve with folder and namespaces.
0
votes
Yes you can certainly group multiple Funcion Apps into one solution as is answered below. But is that the right thing to do in your case? Do you always want to deploy all your Function Apps together? Or does it make sense to have smaller deployable Function App solutions? Perhaps one Function App is very stable and does not require as frequent changes as the other Function App. In that case I would suggest you do keep them in separate solutions. I did a write up about function grouping here: blog.marcduiker.nl/2017/11/21/…
- Marc
1 Answers
5
votes
Yes, you need to create multiple Function App projects in the solution. Each project is a Function App.
Have any shared logic/types in a class library that they share.
The reason that you want project to == app is that a project is where dependencies/etc. is defined. If you had multiple apps in the same project, then you'd have to deploy all your bits to all your apps, it wouldn't be able to reason about a subset. It makes sense to reuse the project/dependency mapping that .NET tooling already has.