Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error CS1705: "which has a higher version than referenced assembly"

People also ask

Has a higher version than referenced assembly system runtime?

This error indicates that there is a version mismatch between what is referenced by the assembly (<Y.Y.Y.Y>) and what the project is pointed towards (<Z.Z.Z.Z>). To correct this, you need to re-add the correct reference in Solution Explorer. Confirm that the DLL version <Y.Y.Y.Y> is present on your computer.


I had this error because "Rebuild" was not really rebuilding.

Solution: Close Visual Studio, really go and delete the bin folder, then rebuild, it might work better.

Also, sometimes Visual Studio lies about references, so check the HintPathin your .csproj files.


If you're using NuGet it is worth going to 'Manage NuGet Packages For Solution', finding the package which is causing issues and hitting update. It should then bring all of the packages up to the latest version and resolve the problem.

Worth a shot as it's a quick and easy.


3 ideas for you to try:

  1. Make sure that all your dlls are compiled against the same version of Common.
  2. Check that you have project references in your solution instead of file references.
  3. Use binding redirections in your web.config. (Originally linked version at wayback machine)

My problem was that I had 2 projects referencing 2 different copies of the same dll which had different versions. I fixed it by removing them both and making sure they were referencing the same dll file.