5

I have multiple projects with different functions for example

Solution A

  • Project A
    • Function A1
    • Function A2

Solution B

  • Project B
    • Function B1
    • Function B2

I have 1 Resource Group (R1) which has Project A functions. If I deploy Project B functions to Resource Group "R1" its removing Project A functions and replacing it with Project B functions.

Is there way to deploy functions from both Project A and Project B together to same Resource Group (R1)?

3
  • 1
    I'm assuming you're using dotnet runtime for your functions. If yes. You can't do it with off the shelf publish or deploy wizards from Visual Studio etc. You have to pull compiled binaries together from both solutions and if necessary, alter the path for "scriptFile" property in each of the function.json file to correct paths. Then deploy the final set of files to function app service. Commented May 3, 2019 at 20:40
  • maybe not from visual studio, but Azure Function is just a "container" for your functions, you can have as many functions as you would like inside Azure Function. Commented May 3, 2019 at 20:47
  • Are they both deploying to the same Function App or different Function Apps? Commented May 6, 2019 at 2:09

2 Answers 2

5

I test with Visual Studio and it works well.

Your function are overwritten by default is because the value Delete existing files is set to true when you deploy you choose Select Existing.

enter image description here

So yo could Edit your Publish Profile Settings. Uncheck the Remove additional files at destination.

enter image description here

Then you will be able to deploy them together. However the recommend way is to deploy everything as one package.

Sign up to request clarification or add additional context in comments.

2 Comments

I've tested this with VS 2019 Enterprise 16.4.6 and it doesn't work as described. Even if the "Remove additional files at destination" is disabled it still overrides the existing function.
What does this correspond to if you need to use a YAML pipeline?
0

George Chen only works if your not zip deploying.

If you used zip method.

  • Delete it.
  • Create a new profile.
  • Uncheck Run from a package file(recommended)
  • Click finish.
  • Follow the steps in George Chen's post

Note. You will need to manually stop the host to delete old functions from your storage and restart the service. Should you need to remove one.

Uncheck Run from package file

2 Comments

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
please give some details rather than just link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.