.Net picking wrong referenced assembly version
Try:
- cleaning temporary project files
- cleaning build and obj files
- cleaning old versions installed at
C:\Users\USERNAME\.nuget\packages\
That worked for me.
I tried most of the answers but still couldn't get it to work. This worked for me:
right click on reference -> properties -> change 'Specific Version' to false.
Hope this Helps.
I'm with Chris Conway on this one (upvoted him). The problem is that you are referencing one of the telerik assemblies in your project which references another one that isn't there.
First thing: I wouldn't install ANY vendor (ie: telerik) assemblies into the GAC. Telerik's stuff is compiled down to just two assemblies anyway (telerik.web.design and telerik.web.ui). Just deploy those with the application.
Second, in each of your .proj files (like .csproj) there is going to be a <reference include..>
which points to the Telerik.Web.UI file. This normally contains a version number. Make sure the assembly you put in the bin folder matches that version.
Third, make sure ALL of your projects use the latest assembly. Also make sure they are grabbing the assembly from a local path instead of the GAC. (I really really don't like the GAC. It has caused no end of issues on some projects I've been on). We typically have an "Assemblies" folder that all projects use for external assembly references.
Fourth, visual studio automatically searches your gac everytime a web site project is loaded and retargets the assembly locations if it finds something in the gac. I can't remember if it ever does this for web application projects, but I haven't had the issue in a long time with those. This can cause similar issues during deployment.
Fifth, you can rebind version numbers for assemblies in the web.config. In the runtime/assemblybinding
section you can use something like the following which takes every telerik assembly deployed in 2008 forward and points it to a very particular version:
<dependentAssembly>
<assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" />
<bindingRedirect oldVersion="2008.0.0.0-2020.0.0.0" newVersion="2010.02.0713.35" />
</dependentAssembly>
My guess is that another assembly you are using is referencing the old dll. Are you familiar with all of the other project references being used and do any of them have a reference to the Telerik dlls?
Can you put in a binding redirect in your web.config file like this?
<dependentAssembly>
<assemblyIdentity name="Telerik" publicKeyToken="121fae78165ba3d4"/>
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/>
</dependentAssembly>