<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/could-not-load-file-or-assembly-nuget-assembly-redirects-rx2etz5wc" -->

---
title: Could not load file or assembly… NuGet Assembly Redirects
description: Explains why .NET applications sometimes throw 'Could not load file or assembly' errors due to faulty or missing NuGet-generated assembly binding redirects in...
canonical: https://daily.dev/posts/could-not-load-file-or-assembly-nuget-assembly-redirects-rx2etz5wc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Could not load file or assembly… NuGet Assembly Redirects | daily.dev
og:description: Explains why .NET applications sometimes throw 'Could not load file or assembly' errors due to faulty or missing NuGet-generated assembly binding redirects in...
og:url: https://daily.dev/posts/could-not-load-file-or-assembly-nuget-assembly-redirects-rx2etz5wc
og:image: https://api.daily.dev/og/posts/rx2EtZ5WC.png
og:image:alt: Could not load file or assembly… NuGet Assembly Redirects
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Could not load file or assembly… NuGet Assembly Redirects

**[Maarten Balliauw](https://daily.dev/sources/maartenballiauw)** · 3 min read · 0 upvotes · 0 comments

## Summary

Explains why .NET applications sometimes throw 'Could not load file or assembly' errors due to faulty or missing NuGet-generated assembly binding redirects in Web.config/App.config. Covers what assembly redirects are and why NuGet's auto-detection can fail, leaving stale or missing redirects. The fix: strip existing binding redirect entries from config files, then run Get-Project -All | Add-BindingRedirect in the Visual Studio Package Manager Console to have NuGet regenerate correct redirects across all projects.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.maartenballiauw.be/posts/2014-11-27-could-not-load-file-or-assembly-nuget-assembly-redirects>

## Questions this post answers

### How do I fix 'Could not load file or assembly Newtonsoft.Json' errors in a .NET project using NuGet?

Remove the existing assemblyBinding element and its child redirects from your App.config or Web.config, then open the Package Manager Console in Visual Studio and run Get-Project -All | Add-BindingRedirect. NuGet will regenerate correct assembly binding redirects across all projects in the solution, resolving version mismatch errors caused by stale or missing redirects.

_daily.dev surfaces practical fixes like this for developers untangling .NET dependency version conflicts._

### What is an assembly binding redirect in .NET and why does NuGet add one?

An assembly binding redirect tells the .NET runtime to treat a referenced assembly version as if it were a different, usually newer, version, such as redirecting any Newtonsoft.Json reference below 6.0.0.0 to use 6.0.0.0 instead. NuGet inserts these into Web.config or App.config automatically to resolve version conflicts when multiple packages depend on different versions of the same assembly.

_developers debugging dependency hell can keep learning about .NET versioning quirks on daily.dev._

## Similar posts on daily.dev

- [Exploring C\# File-based Apps in .NET 10](https://daily.dev/posts/exploring-c-file-based-apps-in-net-10-yepr485nu) · Milan Jovanović · 12 upvotes · 1 comments
- [The Complete Guide to Creating NuGet Packages in .NET](https://daily.dev/posts/the-complete-guide-to-creating-nuget-packages-in-net-4carsceoo) · We Are .NET · 0 upvotes · 0 comments
- [How to Upgrade ASP.NET MVC to .NET Step by Step](https://daily.dev/posts/how-to-upgrade-asp-net-mvc-to-net-step-by-step-i3p1uesfs) · C\# Corner · 2 upvotes · 0 comments
- [Fixing the "Newer version of Aspire.Hosting.AppHost required" error](https://daily.dev/posts/fixing-the-newer-version-of-aspire-hosting-apphost-required-error-vp8wk2gka) · The Art of Simplicity · 0 upvotes · 0 comments

---

Tags: [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#), [#visual-studio](https://daily.dev/tags/visual-studio), [#nuget](https://daily.dev/tags/nuget)

[View this post on daily.dev](https://daily.dev/posts/could-not-load-file-or-assembly-nuget-assembly-redirects-rx2etz5wc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Could not load file or assembly… NuGet Assembly Redirects","url":"https://daily.dev/posts/could-not-load-file-or-assembly-nuget-assembly-redirects-rx2etz5wc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/could-not-load-file-or-assembly-nuget-assembly-redirects-rx2etz5wc"},"datePublished":"2026-10-04T13:04:48.602Z","dateModified":"2026-10-04T13:07:39.939Z","description":"Explains why .NET applications sometimes throw 'Could not load file or assembly' errors due to faulty or missing NuGet-generated assembly binding redirects in...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5faed6d9e63ed6b4a35a46745e623859?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5faed6d9e63ed6b4a35a46745e623859?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Maarten Balliauw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Maarten Balliauw","logo":"https://media.daily.dev/image/upload/s--rOTg3VYO--/f_auto,q_auto/v1791119043/logos/maartenballiauw?_a=BAMAMicg0","url":"https://daily.dev/sources/maartenballiauw"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/could-not-load-file-or-assembly-nuget-assembly-redirects-rx2etz5wc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":".net,c#,visual-studio,nuget","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Maarten Balliauw","item":"https://daily.dev/sources/maartenballiauw"},{"@type":"ListItem","position":3,"name":"Could not load file or assembly… NuGet Assembly Redirects"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/could-not-load-file-or-assembly-nuget-assembly-redirects-rx2etz5wc#faq","mainEntity":[{"@type":"Question","name":"How do I fix 'Could not load file or assembly Newtonsoft.Json' errors in a .NET project using NuGet?","acceptedAnswer":{"@type":"Answer","text":"Remove the existing assemblyBinding element and its child redirects from your App.config or Web.config, then open the Package Manager Console in Visual Studio and run Get-Project -All | Add-BindingRedirect. NuGet will regenerate correct assembly binding redirects across all projects in the solution, resolving version mismatch errors caused by stale or missing redirects. daily.dev surfaces practical fixes like this for developers untangling .NET dependency version conflicts."}},{"@type":"Question","name":"What is an assembly binding redirect in .NET and why does NuGet add one?","acceptedAnswer":{"@type":"Answer","text":"An assembly binding redirect tells the .NET runtime to treat a referenced assembly version as if it were a different, usually newer, version, such as redirecting any Newtonsoft.Json reference below 6.0.0.0 to use 6.0.0.0 instead. NuGet inserts these into Web.config or App.config automatically to resolve version conflicts when multiple packages depend on different versions of the same assembly. developers debugging dependency hell can keep learning about .NET versioning quirks on daily.dev."}}]}
```

