Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

For some reason I don't get intellisense in aspx/ascx files in WSPBuilder projects, normal web projects work fine, does anyone know how I can resolve this?

share|improve this question

3 Answers 3

Not sure if this will work, but try right clicking on the file and open with web form editor. It is the default editor but sometimes this makes a difference.

share|improve this answer
    
ha, yes that worked :) –  Anonymous Jun 11 '10 at 9:16
    
Mmm, it's stopped working now! –  Anonymous Jun 11 '10 at 9:32

I have seen intermittent issues with intellisense as well - here are the key things I have noticed:

1) Sometimes the project/file opens in Visual Studio 2005 - where the intellisense is garbage compared to the 2008/2010 editions. Make sure it is the correct version of visual studio.

2) For the intellisense to work right you need to let it know what libraries it needs to load and parse. You can add the Microsoft.Sharepoint.dll as a reference to the project, and some files (like .ashx, .ascx, etc. ) need to have the import information declared at the top of the file:

<%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>

I don't remember the specifics, but I think for .ashx files the Assembly directive must be the first line for intellisense to work as well.

share|improve this answer

You can edit the web item templates to the project file itself.

To add to *.csproj:

<ProjectTypeGuids>...;{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

To add *.vbproj file:

<ProjectTypeGuids>...;{f184b08f-c81c-45f6-a57f-5abd9991f28f}</ProjectTypeGuids>

I'm pretty sure that these are the VS08 GUIDs. I don't know if they'll work in other versions but the idea would be the same. Find out the web item templates GUID and add it in.

share|improve this answer
    
+1 ProjectTypeGuids usually do the trick –  Bart Jul 4 '11 at 4:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.