NuGet package updates are causing assembly loading issues

37 views Asked by At

Package updates with this issue: Azure.Identity v.1.8.2 => 1.10.4; Microsoft.ApplicationInsights.(several) 2.21.0 => 2.22.0. This is a concern because Visual Studio reports that the old packages have “vulnerabilities detected”.

When I update these packages, then I get web site yellow screens, "Could not load file or assembly". The errors show that first it tries to load an older version, then it is redirected to a newer version, and both fail. If I fix one assembly, then another breaks. This has happened for assemblies: System.Diagnostics.DiagnosticSource, Microsoft.Bcl.AsyncInterfaces, System.Text.Encodings.Web, System.Text.Json, System.Web.http.

Related: all these assemblies have bindingRedirects in my web config. It seems that the package updates are breaking the redirects.

The website uses .NET Framework 4.8.

0

There are 0 answers