Janez Lukan
Janez Lukan

Reputation: 1449

Migrating dotnet-isolated process Azure Function from .net 5 to .net 6

I am trying to migrate my existing .net 5 dotnet-isolated function to .net 6. It is deployed to Azure. I updated all NuGet packages and set up FUNCTIONS_EXTENSION_VERSION to ~4. As mentioned, it's been working fine with .net 5 in dotnet-isolated FUNCTIONS_WORKER_RUNTIME setting, which is still present now.

It runs fine in Visual Studio 2022 but when deployed to Azure, no functions are loaded and executed. Functions app is up and running. With Kudu debug console I get:

2021-12-20T15:25:11.703 [Information] Loading functions metadata
2021-12-20T15:25:11.704 [Information] 0 functions loaded
2021-12-20T15:25:11.705 [Information] Loading functions metadata
2021-12-20T15:25:11.705 [Information] 0 functions loaded
2021-12-20T15:25:26.229 [Information] Host Status: {
  "id": "testname",
  "state": "Running",
  "version": "4.0.1.16815",
  "versionDetails": "4.0.1+d22b332c30efafeed1e4898c9b92280697138194",
  "platformVersion": "96.0.7.599",
  "instanceId": "25d4009bce1d0f8d31e51726fdcef27cc4654e363649d28127051edda8891d94",
  "computerName": "10-30-6-202",
  "processUptime": 51200
}

Are functions with dotnet-isolated and .net 6 already supported on Azure? What else can I check to find out why no functions are found and executed?

Upvotes: 0

Views: 1914

Answers (1)

Delliganesh Sevanesan
Delliganesh Sevanesan

Reputation: 4778

Firstly We created the .Net 5 Isolated v3 Azure Functions and deployed them in Azure through Visual Studio.

enter image description here

After deployed in Azure, we see the following configurations in the portal:

enter image description here

and run the functions:

enter image description here

After this step, change the .Net Core Version from 5 to 6 and functions version v3 to v4 in the .csproj file and rebuild the solution.

  • It was built successfully and executed locally as well.

After changing version to 6, published to same function app through the visual studio as it asked to update azure functions version automatically and selected Yes and published.

enter image description here

Here in the Azure Function App Configuration, it automatically changed the function version to 4:

enter image description here

Updated Answer

Published 2 functions in azure:

enter image description here

Published 0 function in azure:

enter image description here

  • Make sure you added your functions and published into azure to see the published functions are running/available in Function tab.

  • After publishing the function app to azure you may Changed/ Deleted WEBSITE_RUN_FROM_PACKAGE value. If you changed or removed in Application Configuration the functions in function tab are removed in the portal.

We encountered the same issue when we change the WEBSITE_RUN_FROM_PACKAGE value 0 in application Configuration. We see the same debug console log

enter image description here

Note:

  1. If you made that change WEBSITE_RUN_FROM_PACKAGE make that before publishing into azure. Or Publish the function app without zip deploy in using visual to azure.
  2. If you made any change WEBSITE_RUN_FROM_PACKAGE please make sure your function class files available in function tab

Upvotes: 1

Related Questions