RSS Feed   View my LinkedIn profile!   Twitter

Archives

May 2008 (2)
June 2008 (3)
April 2008 (1)
July 2008 (2)
August 2008 (4)
September 2008 (6)
October 2008 (5)
November 2008 (4)
December 2008 (4)
January 2009 (2)
February 2009 (4)
March 2009 (1)
April 2009 (8)
May 2009 (6)
June 2009 (4)
July 2009 (5)
August 2009 (3)
September 2009 (2)
October 2009 (7)
November 2009 (3)
December 2009 (3)
January 2010 (4)
February 2010 (1)

Other Blogs

David McWee's Blog

Links

SA SharePoint Users Group
SharePoint Team Blog
SharePoint Designer Team Blog
Ian Morrish's WSS Demo
Fabian William's Blog

Tag Cloud

Administration, Blogging, Branding, Business Data Catalog, Certification, Development, Maps, Office System, Other, SASUG, Search, Security, SharePoint 2010, SharePoint Conference, SharePoint Designer, SharePoint Events, Social Networking, vNext, Web 2.0, Wikis,

Certifications

Microsoft Certified Technology Specialist
Microsoft Certified Technology Specialist
  • Microsoft Office SharePoint Server 2007
    • Application Development
    • Configuration
  • Microsoft Windows SharePoint Services 3.0
    • Application Development
    • Configuration

Create a SharePoint Custom Action Feature with VSeWSS 

Tags: Development

If you are a SharePoint Developer and are not using Visual Studio 2008 Extensions for Windows SharePoint Services yet, please read Paul Andrew detail how VSeWSS 1.3 March 2009 CTP addresses all common SharePoint Developer requests.

When you are using the extensions, the first thing you might try to do after watching Kirk’s video is use the MOSS SDK Empty SharePoint template to create a very basic feature whose Element Manifest might look like this:

  Element Manifest

  Download ElementManifest1.xml

Warning: Don’t User Add New Item to Create your Manifest!

When adding a new Element Manifest in VSeWSS, the method you use is very important.

 

Don’t use Add | New Item to create a new xml file and type in the above code manually.

 

You will be able to add the new xml file to the project, but WSP View will not pick it up when you add it this way. If you edit the feature.xml to refer to it, your change will be reverted automatically.

image

Method 1: WSP View Create New Feature

Step 1 is the same for both Methods. Create a new Visual Studio Project using the SharePoint SDK Empty template. This will give you an empty project with the correct SharePoint References and just a manifest.xml in WSP View. Click to Zoom
Step 2: From WSP View, hit Refresh to show the Solution name in the window and expand the solution to see the Manifest.xml. Click the Create new feature button to open the create new feature dialog. image
Step 3: For the simplest custom action feature, select Web scope and check “Add default element.xml file.” image
Result: A new feature and a new element in your WSP View with the corresponding .xml files created. And, you will see a new Element1.xml file in your Solution Browser. Double click Element1.xml to open in the text editor to add your action. You can paste the code inside my ElementManifest1.xml CustomAction Element for a quick example of a new Site Action. Make sure that you don’t remove the Elements ID attribute that was generated by VSeWSS .

imageimage 

Method 2: Add | Exisiting Item

  1. Repeat Step 1 from Method 1, then download ElementManifest1.xml to your local hard drive.
  2. Right click the project in Solution Explorer and select Add | Existing Item.
  3. After you select ElementManifest1.xml, you will see it appear as in the results above for Method 1.
    1. The ID Attribute will be generated by VSeWSS and inserted into Elements element of the file
    2. A reference to the manifest will be added to feature.xml.
Result image

Notes

Double click on the feature or element name in WSP View to rename the feature or solution. image
Right click Deploy from the Solution explorer and your new solution will be added, deployed and your feature activated on localhost:80 by default. image
VSeWSS 1.3 always deploys an assembly in the manifest.xml even in cases like this where it is not necessary image
 
Posted by Tom Resing on 20-Oct-09
0 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
 

Comments

Name:
URL:
Email:
Comments: