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

I'm using Visual Studio 2010 to develop a SharePoint Server 2010 solution. Part of this includes custom Page Layouts, but when editing them, intellisense is completely broken, since Visual Studio doesn't appear to know how to handle them. Here's what I've done:

  1. Created a new blank solution
  2. Right-clicked on the solution and created a new "Empty SharePoint Project"
  3. Added references to SharePoint.Publishing, System.Web and anything else a Publishing Page Layout would use
  4. Right-clicked on the project and created a new "Module"
  5. Renamed sample.txt to MyPageLayout.aspx or created a new ASPX Web Form

At this point, intellisense for the new Page Layout is broken. It gets even worse with tools like ReSharper installed. Also, things like "Format Document" will break the Page Layout (by for example changing asp:Content to asp:content)

What I've tried to get intellisense working:

  1. Added a Web.config from a standard Web Application Project to the root of the SharePoint Project - made no difference.
  2. Added the ProjectGuid for a Web Application Project to the SharePoint project file - broke the project.

Is there any way to get intellisense, and the rest of the support Visual Studio can offer for Web Forms, available when developing SharePoint 2010 Page Layouts?

share|improve this question
    
I've asked this over at Stack Overflow as well, but've not gotten any serious answers, so I thought I'd give it a try here as well. –  ScarePoint Dec 15 '10 at 10:27
    
Can we assume that Intellisense works otherwise in non-SharePoint projects? –  mmcglynn Jun 13 '11 at 19:13

3 Answers 3

I had this problem aswell, can't find a solution to make it work seamlessly. But if you right-click the aspx and then choose "View Markup" then it has intellisense.

share|improve this answer

I've got intellisense on my page layouts

Right Click on the page, choose "Open With", choose the web forms default editor.

Type:

hit the Ctrl+Space chord and hey presto, Intellisense

Oh it might also be down to the fact that I also use Re-Sharper, but the Open With trick is very useful.

share|improve this answer

Do the following steps.

  1. Created a new blank solution
  2. List item
  3. Right-clicked on the solution and created a new "Empty SharePoint Project"
  4. Added references to SharePoint.Publishing, System.Web and anything else a Publishing Page Layout would use
  5. Right-clicked on the project and created a new "Module".
  6. Add another asp.net web Application page.
  7. Add new aspx page to this project. change design do code (As per your requirement).
  8. When you done with your design. you just need to copy the page to your Empty SharePoint Project" inside the Module.

this way you able to do the design more easily. or you can also use the xcopy command to your post build event. it just copy your aspx file to inside the module folder.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.