Monday, January 24, 2011

Smart tag not working in visual studio

Recently in couple of threads in I saw a couple of questions regarding Common tasks such as add extender not showing in the web controls. If you are wondering what these common tasks are then, it’s a shortcut menu available for your web server control that helps you extend the functionality of your control such as  the “Add Extender” menu you can see below. When you click on Add Extender menu it generally pops up a dialog with a list of extender controls that you can use with your current control.

The problem can be generally resolved by enabling the smart tag. To do so
1.       Right click on the control.
2.       You can see “Show Smart Tag” menu as below.

3.       Check the menu, if it’s not. Now you will be able to see the menu as above.

But sometime this menu is greyed out or disabled. The problem is due to the mismatch version of your ajaxtoolkit and that of your current website target framework version. If the target version of your website is greater than the version of your ajaxtoolkit control then you may not be able to view the menu. If you are not sure which version of AjaxToolkit you are using then just go to the folder where your control toolkit is loaded from. Right click on the dll and view it’s property. Go to details/version tab and check out it’s file version. Generally if the target framework of your website is 3.5 then the version of your AjaxControlToolkit should be 3.5 as well.

Just make sure to download the correct version of AjaxControlToolkit from the CodePlex and reference it in your project. You can find the binary and source code for the ajax control toolkit in code plex.
If you have downloaded the source code for AjaxControlToolkit then you may wanna set the correct assembly version and build it. Just go to the AssemblyInfo file under Property and change the version in AssemblyVersion attribute.
 If you have already added an older verison of AjaxControlToolkit then remove them from your toolbox and add the new one.
And finally make sure to rebuild your website once again.

Saturday, January 22, 2011

Visual studio debugger hangs when stopping

Visual studio debugger hangs when stopping

Recenty I faced a very weird problem in my visual studio. When I run my application from visual studio and close it visual studio sorts of hang for few seconds. At first I guessed it was may be due to a lot of projects in 1 solution. Then I guessed It could be coz of a lot of library references in my projects. It went for a long time. And I didn't give it a damn.
But it became irritating soon. So I decided to give it a search. And after a long search I finally was able to solve my problem.
I just reset all settings in my import and export settings wizard.
And just solved my problem.
So in case at some point if you come accross this problem just use import and export settings wizard and reset all settings.