asp.net - .Net picking wrong referenced assembly version -


i copied existing project brand new machine start developing on , have run problem version of 1 of referenced assemblies (a telerik dll happens).

the project referenced older version of assembly (lets call v1.0.0.0). new machine has latest version of assembly installed, thought i'd updated (lets call new version v2.0.0.0).

now here's problem: if copy old v1.0.0.0 dll project folder , add reference, web site launches without problem. if delete reference (and delete old dll system) , add new version (v2.0.0.0), page shows following exception:

could not load file or assembly 'xxxxxx, version=1.0.0.0, culture=neutral, publickeytoken=121fae78165ba3d4' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)

clearly, code looking out of date version , can't find it. why?

i greped solution folder version number , couldn't find single reference. double checked text of .csproj file , found version correctly shows latest version , hintpath correctly shows path new dll. furthermore, because didn't install old dll on system doesn't show in gac (though v2.0.0.0 does, expected).

i enabled fusion log viewer try figure out why it's looking old version, no luck:

assembly load trace: following information can helpful determine why assembly 'xxxxxx, version=1.0.0.0, culture=neutral, publickeytoken=121fae78165ba3d4' not loaded.   === pre-bind state information === log: user = mycomp\me log: displayname = xxxxxx, version=1.0.0.0, culture=neutral, publickeytoken=121fae78165ba3d4  (fully-specified) log: appbase = file:///d:/my documents/visual studio 2010/projects/coolproj/webapp/ log: initial privatepath = d:\my documents\visual studio 2010\projects\coolproj\webapp\bin calling assembly : webapp, version=1.0.0.0, culture=neutral, publickeytoken=null. === log: bind starts in default load context. log: using application configuration file: d:\my documents\visual studio 2010\projects\coolproj\webapp\web.config log: using host configuration file:  log: using machine configuration file c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config. log: post-policy reference: xxxxxx, version=1.0.0.0, culture=neutral, publickeytoken=121fae78165ba3d4 log: attempting download of new url file:///c:/windows/microsoft.net/framework/v4.0.30319/temporary asp.net files/root/90233b18/10d54998/xxxxxx.dll. log: attempting download of new url file:///c:/windows/microsoft.net/framework/v4.0.30319/temporary asp.net files/root/90233b18/10d54998/xxxxxx/xxxxxx.dll. log: attempting download of new url file:///d:/my documents/visual studio 2010/projects/coolproj/webapp/bin/xxxxxx.dll. wrn: comparing assembly name resulted in mismatch: major version err: failed complete setup of assembly (hr = 0x80131040). probing terminated. 

all says it starts looking old assembly. have tried find solution online , saw similar so question, seems exact opposite of problem. questioner's program finding wrong dll instead of referenced one. whereas problem program mysteriously looking wrong dll , unable find when right 1 can found locally in bin folder , in gac.

why mine looking old version? else can search find bad reference?

my guess assembly using referencing old dll. familiar of other project references being used , of them have reference telerik dlls?

can put in binding redirect in web.config file this?

<dependentassembly>  <assemblyidentity name="telerik" publickeytoken="121fae78165ba3d4"/>  <bindingredirect oldversion="1.0.0.0" newversion="2.0.0.0"/> </dependentassembly> 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -