Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Functions not showing up in Function app in portal

I've got a solution that contains a web app and class libraries. I added two Azure function projects to this, the first is version 1 and the second version 2. Both run fine locally. This code is in an online repository (Visual Studio Online, now Azure DevOps), and I set up continuous deployment from it to an Azure function set up in the portal. However, neither project is showing up under Functions in the portal although the code deployed successfully just like Azure websites and the URL says "Your Function App is up and running". I'm using Visual Studio 2017.

like image 585
nmit026 Avatar asked May 13 '19 04:05

nmit026


People also ask

Is Azure Functions and function app same?

An app represents a single application running on that infrastructure. You can deploy multiple apps to a single plan. In Azure Functions, your hosting and application are also separated, but you have additional hosting options available for elastic hosting, where Azure Functions manages scaling for you.

How do I add apps to Azure function?

To find the application settings, see Get started in the Azure portal. The Application settings tab maintains settings that are used by your function app. You must select Show values to see the values in the portal. To add a setting in the portal, select New application setting and add the new key-value pair.


1 Answers

If you have'nt managed to get CD working, here's the trick. You mentioned that you are using Runtime V2 (.NET CORE ). I have some functions setup in CI/CD as well. In the Build Pipeline Build you function project with dotnet Build Task and point it with only the Function project path.

enter image description here

And in the arguments of the task add this /p:DeployOnBuild=true /p:DeployTarget=Package;CreatePackageOnPublish=true

After the build task, use the Publish Artifact task by default it outputs eveything to $(Build.ArtifactStagingDirectory) enter image description here

Now the last step. Use the Azure App Service Deploy task and Authenticate with your credentials like subscription,RG etc.

Now in the App Service Type choose FunctionApp on Windows/Linux ( your choice)

Now in the Package or Folder argument provide $(Build.ArtifactStagingDirectory)/YourFunctionProjectName.zip

enter image description here

This helped me to setup CI/CD for Azure Functions.

like image 152
HariHaran Avatar answered Oct 07 '22 05:10

HariHaran