As mentioned in my recent blog post I was looking forward to trying out my new Visual Studio 2008 installation. Finally, my XP Partition will become almost obsolete and the compatibility issues of Visual Studio 2005 and Vista x64 will be a thing of the past. Visual Studio 2008 installed without a hitch, it did take fairly long as one would expect due to the program being of significant size. I decided I would go ahead and install the AJAX Extensions as well, to save the hassle of adding this in later if AJAX is required on a particular project. The templates installed fine, the extensions went in without any trouble too (this enables AJAX on 2.0 developments) – it’s built into 3.5 however.

Finally, the AjaxControlToolkit is a wonderful download which provides many controls that you can simply add into your applications, so I decided to install these too. Unfortunately this isn’t an automated installer, however it is very straightforward (usually) unzipping the files and then adding the .dll to the Toolbox and Voila, we have our controls ready to use. Although this wasn’t the case, when I tried to add the .dll to the Toolbox the controls wouldn’t show up, despite being ‘succesfully added’. After selecting “View All” it appeared that although they had been added, they were grayed out! So why was this? As anyone would do in this situation, I headed over to Google and found some possible fixes. This led to me deleting all of the .tbd files relating to the Toolbox, thus rebuilding it within Visual Studio 2008, which was to no avail.

Then I stumbled upon this blog post which expressed the same problem, one of the posters pointed out that some people solved the problem by unplugging their wireless Microsoft keyboard and/or mouse. (What?!). As I use a Logitech MX Revolution and a wired Microsoft Ergonomic keyboard, this couldn’t have applied to me could it? After an hour had past investigating this problem, I was willing to try anything, so believe it or not I went ahead and unplugged the keyboard and mouse dongle. Did it work? Of course not!

So just before accepting defeat, I resorted to randomly clicking through menus and property dialogs in the search of something which may enable the Ajax Control Toolkit. Then as luck has it, I looked in the property pages of my solution. (Right Click > Property Pages in Solution Viewer), and saw a Target Framework drop down menu. Now, my solution was originally targeting 2.0 as I was unsure if my deployment server could handle any newer. As an experiment I selected to target the new 3.5 Framework, and voila! The Ajax Control Toolkit was instantly available.

Now switching back to target the 2.0 or 3.0 Framework will gray the controls out. So where did the misconception occur? Well, when creating a new project you will notice the Framework drop down box in the top right hand corner, this was set to 3.5. This means that the templates are for that particular framework. However the template displayed under 3.5 was actually to create a 2.0 application (confused?), hence making the downloaded 3.5 version of the toolkit unavailable (grayed out). The solution is to make sure your web application targets the 3.5 Framework if you are using the latest Ajax Control Toolkit. I’ve attached a screenshot of the dialog box to change this in your solutions!

Target Framework

Be Sociable, Share!