Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to fix this error "Microsoft.Extensions.Azure: Could not load file or assembly 'System.Diagnostics.Tracing, Version=5.0.0.0,"

Tags:

c#

.net

azure

there’s a problem that I didn’t understand where it came from because the script worked yesterday , I woke up and I found this problem that wasn’t there yesterday. I’m working on a project (net 5.0) that contains Azure Function ,Entity Framework Core ,Microsoft Graph.

Error :

Microsoft.Extensions.Azure: Could not load file or assembly 'System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Impossibile trovare il file specificato.
like image 688
AMIR BAHROUNI Avatar asked Feb 02 '26 11:02

AMIR BAHROUNI


1 Answers

If you updated your function to .NET 6, you need to use Azure Functions v4. Add this below to the function configuration in the Azure portal:

FUNCTIONS_EXTENSION_VERSION = "~4"
like image 131
cuasijoe Avatar answered Feb 05 '26 01:02

cuasijoe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!