Symptom
When you use a newer version of the AjaxControlToolkit in the AutoComplete QuickStart, a runtime error occurs:
“Parser Error Message: Could not load file or assembly ‘AjaxControlToolkit, Version=1.0.10618.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e’ or one of its dependencies.”
Root Cause
Since the AjaxControlToolkit.dll assembly is strong named, you must use the same assembly version that the AjaxControlToolkit.WCSFExtensions was compiled against (because the CLR attempts to bind –by default- with the exact version of an assembly that the application was built with).
Workaround
(Note: I smoke tested the AutoComplete QuickStart with AjaxControlToolkit 1.0.10920.x and I faced some issues; therefore, I suggest you not to run the QuickStart with this version. Read the known issues section for more details.)
You can use assembly version redirection to avoid having to rebuild the AjaxControlToolkit.WCSFExtensions.dll assembly. With the redirection mechanism, you can tell the CLR to redirect one assembly version to another:
1) Copy AjaxControlToolkit.dll (and all the sub-directories) located in the SampleWebSite\Bin folder of the toolkit’s zip file to the Lib\AjaxControlToolkit folder of the QuickStart directory.
2) Open the AutoComplete QuickStart.
3) Add the following XML code to the AutoCompleteQuickStart Web.config file after the close tag. Replace the newVersion attribute to match the version of the AJAX Control Toolkit that you are using (for example, the current version is 1.0.10920.32880).
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="AjaxControlToolkit"
publicKeyToken="28f01b0e84b6d53e"
culture="neutral"/>
<bindingRedirect oldVersion="1.0.10618.0"
newVersion="1.0.10920.32880"/>
Note: You can find the assembly version number in the properties of the reference to the AjaxControlToolkit assembly
4) Run the QuickStart.
AjaxControlToolkit (1.0.10920.x) issues
This section describes the issues faced when running the Autocomplete QuickStart with the AjaxControlToolkit 1.0.10920.x.
o No autocomplete list is shown until you hit the backspace key.
o On Numeric fields, you get a list of “undefined” words. This seems to be related with an issue with this version of the the AjaxControlToolkit.
Note: This issue was resolved with changeset 27752. More information, go to here.
