1
<tt:TooltipExtender ID="teAutoServiceShutdown" TargetControlID="cbAutoServiceShutdown"

Parser Error Message: Could not load file or assembly 'AjaxControlToolkit, Version=3.0.20820.16598, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

what to do?

1
  • Well, I really don't know what kind of answer you expect to a question like this other than: reference the 'AjaxControlToolkit, Version=3.0.20820.16598, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' assembly to your project or put it in the GAC. Commented Sep 25, 2011 at 19:43

3 Answers 3

2

I know this question is nearly a year old, but I just ran into this problem myself. I solved it by simply doing "Build -> Clean Solution" which I guess cleared the assembly cache.

Sign up to request clarification or add additional context in comments.

Comments

1

Few possible ways:

  1. Read How the Runtime Locates Assemblies and then try to figure out whether an assembly is referenced correctly and is in any of the expected path (basically you can manually go through the assembly resolving steps yourself and see whether you are able to find reference yourself ;) )
  2. Remove a reference from project file (and I believe web.config), cleanup solution, add reference again
  3. Build project manually using msbuild YourSolution.sln /v:diag > log.txt command line and then see generated log.txt file for any issues while an assembly reference resolving
  4. Use filemon tool to see where Visual Studio trying to find a file

2 Comments

i change AjaxControlToolkit from old version to new one. I add new reference to project and i get this error. In web.config is only this <add tagPrefix="ajax" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" />
@senzacionale : have you checked whether this assembly in GAC and if so -whether version is latest? Also see web project csproj file, it should contains something like <HintPath>..\..\..\..\ThirdParty\AjaxControlToolkit\AjaxControlToolkit.dll</HintPath> with CORRECT hint path
1

The build Output window should give you a fix/workaround for this problem.

Clean and rebuild the solution.

Examine the contents of the Output window, look for this text:

Consider app.config remapping of assembly "AjaxControlToolkit, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" from Version "4.1.40412.0" [C:\Visual Studio\App\Lib\bin\Debug\AjaxControlToolkit.dll]

Following this there will be a fragment you can paste into the <assemblyBinding> section of your web.config.

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3247: 
Found conflicts between different versions of the same dependent assembly. 
In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; 
otherwise, add the following binding redirects to the "runtime" node in the application configuration file: 
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
        <assemblyIdentity name="AjaxControlToolkit" culture="neutral" publicKeyToken="28f01b0e84b6d53e" />
        <bindingRedirect oldVersion="0.0.0.0-16.1.0.0" newVersion="16.1.0.0" />
    </dependentAssembly>
</assemblyBinding>

Once you paste that in and rebuild it should automatically reference the version of the Toolkit specified as the newVersion.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.