Easy way to import Azure function to another Function app

Goal: Quickly import Azure functions to another function app.

Pre-requisites: A ready-made azure function. (This could be of any type: HTTP trigger, Timer Trigger, Queue Trigger, etc..)

Steps:

Click on Advance tools (Kudu) from your source Azure function app's Platform features.

1.png

From Kudu Services, click PowerShell under Debug console.

bb.png

Now that you're in Diagnostic Console, navigate to site/wwwroot by clicking the item from the grid, or typing the path from the powershell that is currently displayed in the screen.

cc.png

Download the wwroot folder by clicking the download folder. This will download the zipped version.

dd.png

Go now to your destination Azure function app. Again, navigate to its Diagnostic Console (we already know where to find this, aren't we?), and make your way through data path.

ee.png

From data path, create new folder and name it "SitePackages"

ff.png

Navigate to path/SitePackages Remember the zipped folder that we have downloaded? We're going to use it now. Drag it to the screen. Wait till it is done uploading.

gg.png

Still under data/SitePackages path, create a new file and name it "siteversion.txt". Click on Edit icon and type "wwwroot.zip" and save it.

hh.png

ii.png

Now back to your destination Azure function app, navigate to Application settings under Platform features tab

jj.png

Add new setting: APP SETTING NAME: Website_Use_Zip Value: 1

kk.png

NOTE: Don't forget to save your changes! See that violet color line from the row? That's an indicator that a new change has happened that needed to be saved.

Refresh your Azure function app by clicking the refresh button.

ll.png

And that's it! Do a refresh and your functions should be successfully imported.

mm.png