Alex's Coding Blog
  • Home
  • About
  • Projects
  • Contact me

Blog

Solved: Azure Function Could not load file or assembly System.Diagnostics.Tracing, Version=5.0.0.0 after migrating to .NET 6

  • April 26, 2022 April 26, 2022
  • by Alexander

Encountered with a probelm after migrating to .NET, one of my azure functions is failing with the following message:

Microsoft.Extensions.Azure: Could not load file or assembly 'System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

I found that the problem somehow related to Microsoft.Azure.WebJobs.Extensions.Storage.Queues package, however there is no option to upgrade it to recent one. the 6 month old version I'm using is the up-to-date.

The solution lays basically in the definition of .NET 6 support for Azure Function availability notice. .NET 6 is available for Azure Function 4.0, and since the problem is in extension library function extension version should be set accordingly.

To fix the problem go to Configuration section of your function, and change FUNCTIONS_EXTENSION_VERSION "~3" to "~4"

image

Cheers

.NET Core Azure Functions

Debugging microservices is always tricky and time consuming specially without proper code level logging in place.

Meet Konso. It's developed as a solution for this challenge and can help with saving development effort for your team up to 30%. 🎯🎉

The key functions are:

🔥 Centralized logging for your microservices
🔥 Tracing with metrics and value tracking events
🔥 Ad-Hoc events exploration
🔥 Saving your queries
🔥 Create alerts and get notified


You can start collecting you project's logs in 5 minutes. 🕐💪

To Learn more about logging tool, book a free demo.
To get started for free, Create your free account now

Alexander Lvovich

Solution Architect and Software Developer.

Share on:

No comments are allowed for this post

Recent Posts

  • Easily track and troubleshoot errors in your .NET 7 web app using Konso's logging feature
  • How to disable object model validation .NET 7
  • Keep Your Passwords Safe: 5 Tips for Protecting Yourself After the Latest LastPass Data Breach
  • How to ping from .net application container
  • Freelancing myths you should consider before dive in
  • How to set up a honey token for dotnet project with Konso

Categories

  • Azure
  • Architecture
  • .NET Core
  • Certification
  • DevOps
  • How-to
  • Azure Functions
  • Serverless
  • Cosmos DB
  • Security
  • Thoughts
© Copyright 2023, Alexander Lvovich. Theme by Colorlib