Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Creating web part page template for webpart pages using visual studio code - deployment error

$
0
0

I created a visual web part for list Employee details. My environment for development is SharePoint 2010 with Visual Studio 2010. I need to add the visual webpart programmatically to  a webpartpage using visual studio.

Created a web part page template with the following steps:

  • Created a module named WebPartPageTemplate
  • Renamed Sample.txt to WebPartPageTemplate.aspx
  • Cleaned all the text from WebPartPageTemplate.aspx
  • Copied the markup of Application page from another Visual Studio instance to WebPartPageTemplate.aspx.
  • Modified the page directive, and added extra register for WebPartPages.
  • Added markup for WebPartZone in the main content. The WebPartPageTemplate.aspx looks like:
  • Modified the module's Element.xml as

When I build and deploy this application I get a deployment error:  Error    1    Error occurred in deployment step 'Activate Features': Failed to instantiate file "WebPartPageTemplate.aspx" from module "WebPartPageTemplate": The specified list does not exist.

What could be this error all about? Any help on this is highly appreciated.


Viewing all articles
Browse latest Browse all 25064

Trending Articles