c# - Is my Azure Function still using .NET 6 after upgrading to .NET 8? - Stack Overflow

I've recently upgraded an Azure Function from .NET 6 to .NET 8. I updated the target framework in

I've recently upgraded an Azure Function from .NET 6 to .NET 8. I updated the target framework in my project files and ensured the deployment settings were updated for .NET 8. However, when I log into the Kudu environment and run dotnet --info, it still shows the runtime version as .NET 6:

Microsoft.AspNetCore.App 6.x.xx
Microsoft.NETCore.App 6.x.xx

Steps taken:

  • Updated Target Framework: changed the .csproj file to target net8.0
  • Configuration in Azure Portal: set the stack version to .NET 8 (LTS) under Configuration → General Settings.

Observations:

The function app runs correctly, but the runtime version in Kudu does not reflect .NET 8.

Questions:

  • Why does the runtime in the Kudu environment still show .NET 6 instead of .NET 8?
  • How can I confirm that my Azure Function is actually running on .NET 8 in the cloud?
  • Are there additional steps required to fully upgrade Azure Functions to .NET 8?

Any guidance on how to resolve this mismatch would be appreciated.

Thank you!

I've recently upgraded an Azure Function from .NET 6 to .NET 8. I updated the target framework in my project files and ensured the deployment settings were updated for .NET 8. However, when I log into the Kudu environment and run dotnet --info, it still shows the runtime version as .NET 6:

Microsoft.AspNetCore.App 6.x.xx
Microsoft.NETCore.App 6.x.xx

Steps taken:

  • Updated Target Framework: changed the .csproj file to target net8.0
  • Configuration in Azure Portal: set the stack version to .NET 8 (LTS) under Configuration → General Settings.

Observations:

The function app runs correctly, but the runtime version in Kudu does not reflect .NET 8.

Questions:

  • Why does the runtime in the Kudu environment still show .NET 6 instead of .NET 8?
  • How can I confirm that my Azure Function is actually running on .NET 8 in the cloud?
  • Are there additional steps required to fully upgrade Azure Functions to .NET 8?

Any guidance on how to resolve this mismatch would be appreciated.

Thank you!

Share Improve this question edited Nov 19, 2024 at 4:55 marc_s 757k184 gold badges1.4k silver badges1.5k bronze badges asked Nov 18, 2024 at 23:14 user12599720user12599720 1211 gold badge1 silver badge6 bronze badges 6
  • Can you show the full output from "dotnet --info". I have an Azure Function that was upgraded from .NET 6 to .NET 8 some time ago and I don't recall there being any unexpected changes required. Kudu is showing the .NET SDK version as 8.0.400 for me. – jmcilhinney Commented Nov 19, 2024 at 1:51
  • @user12599720 Check the runtime in your Azure Function by logging System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription. Ensure FUNCTIONS_EXTENSION_VERSION is set to ~4 and restart the Function App to apply changes. – Dasari Kamali Commented Nov 19, 2024 at 3:34
  • @user12599720 Can you share your function code and csproj in the question? – Dasari Kamali Commented Nov 19, 2024 at 3:35
  • @user12599720 Is the .NET 8 model an isolated process or in-process model? – Dasari Kamali Commented Nov 19, 2024 at 5:12
  • @jmcihinney, this is on linux global.json file: Not found Host: Version: 6.0.35 Architecture: x64 .NET SDKs installed: No SDKs were found. .NET runtimes installed: Microsoft.AspNetCore.App 6.0.35 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.35 [/usr/share/dotnet/shared/Microsoft.NETCore.App] – user12599720 Commented Nov 19, 2024 at 15:00
 |  Show 1 more comment

1 Answer 1

Reset to default 0

How can I confirm that my Azure Function is actually running on .NET 8 in the cloud?

As per the Doc, .NET 6 has reached its end of support, and any applications targeting .NET 6 are recommended to upgrade to .NET 8.

  • As .NET 6 has reached it's end of support, your application will work only on .NET 8. In your case the issue might be cached data or old configuration settings that haven't been fully refreshed that showing .NET 6 version.

  • Clearing old deployment artifacts might resolve your issue. Try deleting the bin and obj folders from your Function App project, then redeploy the application.

When we run the dotnet --info command in the Kudu console of an Azure Function App, it will provide all the runtime versions and installed SDK's in the function app environment.

dotnet --info

It is better to create a new Azure Function App in .NET 8 and deploy your application, as this will help avoid further issues.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745589455a4634744.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信