Jayanth Kulkarni
Jayanth Kulkarni

Reputation: 41

Deploy only one azure function to Function Apps (has many functions)

I have a function app in azure which has many functions. And, I have a solution which has 6-7 projects (azure function), now, I would like to deploy only one function which has some changes, to azure portal. While deploying only one modified function to azure portal, other functions are getting deleted. Please suggest some way to deploy only one function to portal instead of all the functions.

Example:

Function app in portal: Function1 Function2 Function3 Function4, Function5, Function6, Function7

Visual studio solution

Project 1: Function1, Function2

Project 2: Function3

Project 3: Function4, Function5

Project 4: Function6

Project 5: Function7

There is change in Function3, when I deploy Function3, existing Function1, Function2, Function4, Function5, Function6, Function7 are getting deleted.

Kindly suggest some solution to deploy only Function3 without deleting Function1 & Function2 & Function4, Function5, Function6, Function7

Thanks

Upvotes: 1

Views: 2029

Answers (1)

George Chen
George Chen

Reputation: 14324

If you are using visual studio, when you deploy function, there is a setting to configure this.

There is a setting called Delete Existing Files, in Profile Settings called Removed additional files at destination. The default value is true, uncheck this setting it won't delete your function in your app.

enter image description here

enter image description here

Update:If you use vs2017, you could edit with Manage Profile Settings, then you will be able to edit this value.

enter image description here

Update: when you publish it choose Create Profile, then you could edit the pubxml file. The parameter SkipExtraFilesOnServer is used to control the same setting, if you don't want to delete the azure function set it to true.

enter image description here

enter image description here

Upvotes: 1

Related Questions