Deploying .net8 Functions To Azure After Update

David Barrett 21 Reputation points
2024-04-09T13:07:08.8833333+00:00

I have a function app which until recently was .net core 6, I have been making some changes to the process and as part of that I have updated the project to .net 8.

The function app is built and deployed via azure devops pipelines which have been updated accordingly.

The issue that I have is that once deployed the functions are not showing up in azure on the overview screen and do not appear to be running - though I am seeing some odd behaviour around this which I will detail later.

Build Pipeline

This is fairly standard and other than being changed to use .net8 is the same as it was when the project was .net6
It builds the project, runs some unit tests and then publishes the built project into the artefact staging directory.

The project is not zipped up (We are not using run from package/zip deploy).

Release Pipeline

Again this is fairly standard, we run some commands to open up the firewall, deploy the functions and then run the command to close the firewall again.

This is the task that we are using to deploy the functions

User's image

Once the deployment had run (Successfully)

This is what I see in azure :
User's image

I have noted some odd behaviour, occasionally the functions do appear and on a few occasions I can see in the logs that they ran but then after another deployment they were gone again.

I have noticed (Though it doesn't seem consistent) that if I toggle one of the config settings sometimes that will kick things off and the functions will be visible and running.

I am stuck going in circles with this now, any assistance would be appreciated.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,988 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Michael Taylor 54,296 Reputation points
    2024-04-09T15:22:51.0333333+00:00

    Based upon the docs the runtime stack you're using isn't valid. It appears for NET 8 you should use DOTNET-ISOLATED|8.0.


  2. Chris Neal 0 Reputation points
    2024-05-21T15:04:04.99+00:00

    I had the same issue, and this was the culprit in my case:User's image My Azure function had a using statement with the above package, but no package installed according to the package manager. When I upgraded Microsoft.Extensions.Hosting 8 for two projects within the solution, I manually installed the package for my isolated function (itself upgraded from Net 7), and now it appears without issue.

    0 comments No comments

  3. Amrit CloudDev 0 Reputation points
    2024-07-17T05:54:20.1933333+00:00

    I was facing the same issue.

    Following 2 steps resolved my problem

    1. My DotNet Publish step was creating extra bin folder inside publish folder so I added extra step to my build pipeline to remove bin folder before packaging it.

    User's image

    1. I updated my AzureFunctionApp task to version 2 and removed deploymentMethod property. User's image
    2. Also noticed that if you are running DotNet Publiush after DotNet Build step in your build pipeline and using *.csproj filter to find csProject file, it's finding two csprojects. It's the WorkerExtentions project puslish overwriting my previously published files. I have to update my csProject filter search so that it only finds one csProject. User's image
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.