Error CS1705 which has a higher version than referenced assembly
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
Introduction
Error CS1705 occurs when a .NET project references assembly A, which depends on a specific version of assembly B, but the project also references a different (lower) version of assembly B. The compiler cannot resolve the version conflict because assembly A expects a higher version than what is available. The fix involves aligning assembly versions by updating NuGet packages, adding binding redirects, or ensuring all projects in a solution target compatible dependency versions.
What the Error Looks Like
This means LibraryA was compiled against Newtonsoft.Json version 13, but your project only has version 12 available.
Why This Happens
.NET assemblies have strong version identities. When assembly A is compiled against assembly B version 2.0, it records that dependency. If your project provides assembly B version 1.0, the compiler detects the mismatch:
Common causes:
- Two NuGet packages depend on different versions of the same library
- A project was upgraded but not all dependencies were updated
- Manual assembly references point to an old DLL
Fix 1: Update the Lower-Version Package
The most straightforward fix — update the outdated package to match or exceed the required version:
Fix 2: Binding Redirects (.NET Framework)
For .NET Framework projects, binding redirects in app.config or web.config tell the runtime to use a specific version regardless of what was requested:
Enable automatic binding redirect generation in the .csproj:
Fix 3: Consolidate Package Versions
When multiple projects in a solution use different versions:
In Visual Studio, use the NuGet Package Manager's "Consolidate" tab to find and fix version mismatches across projects.
Central Package Management (Recommended)
Use Directory.Packages.props to enforce consistent versions across the entire solution:
Fix 4: Clean and Rebuild
Stale DLLs in the output directory can cause phantom version conflicts:
Fix 5: Check Transitive Dependencies
A transitive dependency (dependency of a dependency) may require a higher version:
Adding a direct reference to the conflicting package at the required version overrides the transitive version.
Diagnosing the Issue
Common Pitfalls
- Updating only one project in a multi-project solution: If ProjectA updates Newtonsoft.Json to 13.0 but ProjectB stays on 12.0, CS1705 occurs when ProjectA references ProjectB. Update all projects to the same version.
- Relying on binding redirects without understanding the cause: Binding redirects mask the version mismatch at runtime but do not fix the root cause. If the newer version has breaking changes, the redirect causes runtime errors instead of compile errors.
- Stale DLLs in bin/obj directories: Old assembly versions cached in build output cause false CS1705 errors. Always
dotnet cleanand deletebin/andobj/before troubleshooting version conflicts. - Mixing .NET Framework and .NET Standard packages: Some packages have different version numbers for .NET Framework vs .NET Standard. Ensure the target framework of all projects is compatible with the package versions referenced.
- Not checking transitive dependencies: The conflict may not be in a package you directly reference. Use
dotnet list package --include-transitiveto find hidden version mismatches in dependency chains.
Summary
- CS1705 means one assembly expects a newer version of another assembly than what your project provides
- Update the outdated package to the required version with
dotnet add package - Use binding redirects in .NET Framework projects to redirect old version requests to the installed version
- Use Central Package Management (
Directory.Packages.props) to enforce consistent versions across a solution - Clean build artifacts and check transitive dependencies when the error persists after updating
Related reading
- Error Invalid option ''6'' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default
- error Unable to find vcvarsall.bat
- Escape command line arguments in c
- Escape curly brace ''{'' in String.Format
- Error CUICatalog Invalid asset name supplied null, or invalid scale factor 2.000000
- Error dictionary update sequence element 0 has length 1; 2 is required on Django 1.4
- Escape curly brace '' in String.Format
- Escape invalid XML characters in C

OOD Fundamentals
Master object-oriented design from first principles, SOLID, design patterns, and classic interview problems with hands-on coding.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.