FileNotFoundException assembly .NET Origin: Application & API OSI layer 7 · Application Last updated 14 Oct 2026

Could not load file or assembly 'X, Version=…' or one of its dependencies

The runtime couldn’t find or load a referenced DLL — missing from the output, wrong version, or wrong platform (x86/x64).

Exact message you may see Could not load file or assemblyThe located assembly's manifest definition does not match
Seen on: .NET Windows

Meaning

The assembly binder needs the exact referenced version (or a binding redirect on .NET Framework). Deployments missing a DLL, version conflicts between packages, and 32/64-bit mismatches are the classic causes.

Common causes

  • DLL not copied to the output/publish folder
  • Two packages require different versions (needs binding redirect on .NET Framework)
  • x86/x64 mismatch (BadImageFormatException)
  • Missing native dependency of a managed package
  • Assembly blocked after download (Windows “Unblock”)

⚡ Quick fix

  1. Clean, restore and republish (dotnet publish -c Release)
  2. .NET Framework: enable AutoGenerateBindingRedirects
  3. Match the platform target to the native dependencies
  4. Check the fusion log for the exact probing failure

Detailed fix by platform

.NET

  1. .NET Framework: set <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>; use Fuslogvw.exe to see binding failures. .NET (Core): check *.deps.json and use dotnet list package --include-transitive for conflicts.

How to diagnose

  1. Assembly — Which name and version?
  2. Output — Is the DLL in the publish folder?
  3. Versions — Conflicting package versions?
  4. Platform — x86 vs x64?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

0xC000007B — The application was unable to start correctly (0xc000007b) (Windows)0xC000007B500.30 — HTTP Error 500.30 - ASP.NET Core app failed to start (.NET)500.30ChunkLoadError — ChunkLoadError: Loading chunk 123 failed. (JavaScript)ChunkLoadErrorClassNotFoundException — java.lang.ClassNotFoundException / NoClassDefFoundError (Java)ClassNotFoundExceptionMIME type not executable — Refused to execute script from 'x' because its MIME type ('text/html') is not executable (JavaScript)MIME type not executa…module MIME type — Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html" (JavaScript)module MIME typeNETSDK1045 — error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0 (.NET)NETSDK1045NU1605 — error NU1605: Detected package downgrade: X from 8.0.1 to 8.0.0. Reference the package directly from the project to select a different version (.NET)NU1605FileNotFo…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.