Is intellisense not working as expected in VS 2008?
I am having problems getting Intellisense to work in ASP.NET Source View.
For example, I register the Telerik RadControls DLL with a tag prefix as stated in the examples:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
But when typing <telerik: no intellisense.
Also, after adding a few controls, they are highlighted with the error "Unrecognized tag prefix or device filter" telerik ". This is pretty annoying and I can't find a solution.
Btw, the webpage itself is working - its just Intellisense which doesn't.
a source to share
Intellisense can fail for various reasons, so I'm going to ask you a few questions:
- Is the development time working as expected? Sometimes, if the time assembly is not loaded, intellisense can fail.
- Are you working on a remote drive by accident? We also found problems with this. The removed disk must be added as a trusted build location.
- If you are using an earlier version of RadControls, you also need to add a link to Telerik.Charting.dll. Which version are you using?
- Finally, we found that upgrading to Visual Studio 2008 SP1 resolves many issues. I highly recommend you upgrade if you haven't already.
a source to share
I noticed a common problem with intellisense in VS2008 (with SP1). When they started supporting JS intellisense, a lot of things got slower - or sometimes didn't work.
I know the description problem - not only with telerik controls, but other (and mine) control libraries as well. Most of the time rebuilding - closing all pages and restarting VS solves the problems for me.
My particular problem (I think it matters) is that I am using the German edition of VS2008. But also other rules (from my experience): Project size (somewhere over 50 pages gets worse). The time when I had to kill the application while debugging :) Total time (in session) I am working on a project.
One last tip (which might help). I feel less of a problem when I add a link to the controls directly in the web.config. Also, it frees me from register directive on every page.
It looks like this:
<controls>
<add assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagPrefix="telerik" />
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions,
NTN
Manfred
a source to share
Just fixed it myself for VS2008 (for aspx / ascx and codebehind) by adding Telerik.dlls to the GAC on my local development machine.
I had this problem before and both times it happened when my project was hosted on a network drive where the project path would be something like this: * \\ networkmachinename \ c $ \ inetpub \ projectname *
Correction:
On your local computer, open Start> Programs> Microsoft Visual Studio 2008> Visual Studio Tools> Visual Studio 2008 Command Prompt (run as admin)
Using the gacutil tool and the following commands (or more depending on how many DLLs you want to use) add assemblies to your GAC:
gacutil.exe -i "C: \ Program Files (x86) \ Telerik \ RadControls for ASPNET AJAX Q2 2008 \ Bin35 \ Telerik.Web.UI.dll"
gacutil.exe -i "C: \ Program Files (x86) \ Telerik \ RadControls for ASPNET AJAX Q2 2008 \ Bin35 \ Telerik.Charting.dll"
Obviously change the directories corresponding to your OS / Telerik / Framework versions, then close the Visual Studio 2008 command line, close VS2008 (if open), and restart VS2008 again.
You will first find that intellisense works with aspx / ascx files and within minutes it will work with your codebehind files too. Close and try again if it still doesn't work.
One more note, if you have a small error somewhere in your root web.config file of your site, you will also lose intellisense for Telerik (and possibly other) controls - so check that your web.config files are not are wrong in the first place.
a source to share