Intro to wspbuilder

Source: Internet
Author: User
Intro to wspbuilder

 

Wspbuilder is a tool for building Web Solution (WSP) files to deploy out to a Sharepoint farm. it is free, open source, and available on codeplex here: http://www.codeplex.com/wspbuilder. it is a tool that, in my opinion, every SharePoint developer shocould be using.

So what is a WSP file? WSP files are web solution files. essential, they are CAB files that contain a special manifest. XML file that let's SharePoint know what to do with it. WSP files are stored in the SharePoint solution store. when a WSP file has been stored in the solution store, it can be deployed out to all front-end servers in the farm with one click. when you use WSP files, you no longer have to deploy content to front-end servers using Batch scripts and there is no chance of forgetting to deploy to one of your previous front-end web servers. as an added bonus, if front-end servers are added to the farm, all deployed Web solutions will be deployed to them automatically.

So why use wspbuilder? Wspbuilder simplifies the rather tedious process of creating WSP files from all of your assemblies, content, and components required to deploy your SharePoint solution. instead of having to manually create a manifest. XML, a ddf file, and using the makecab.exe utility, you simply have to use the "build WSP" feature within wspbuilder.

For this article, I will be downloading the Visual Studio add-in, since that is the easiest way to use the tool. installation of the tool is straightforward and consists of clicking the next button a few times.

After wspbuilder has finished installing, go ahead and fire up Visual Studio. You shocould now see some new options available within the Tools menu as your strated below:

There will also be a few new project templates available:

Create a new wspbuilder project named wspbuilderdemo. After your project is created, add a new blank feature to the project from the wspbuilder section and name it wspbuildercontenttype:

This will put two XML files into a folder off of the "12" folder in your project. this folder represent the 12 hive in Sharepoint. with this two files we will be building a custom content type. replace the contents of feature. XML with the following text:

 <?xml version="1.0" encoding="utf-8"?>
<Feature Id="6D588B85-4DF2-4d5e-BFB6-20787D5280C3"
Title="WSPBuilder Content Type"
Description="This is a feature for demonstrating WSPBuilder."
Version="12.0.0.0"
Hidden="FALSE"
Scope="Site"
DefaultResourceFile="core"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="elements.xml"/>
</ElementManifests>
</Feature>

 

Replace the contents of the elements. xml file with the following text:

 <?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ContentType
ID="0x01010044B677920FAA40d69DEEB5FC8BC906BD"
Name="WSP Builder Content Type"
Description="This is a test content type for demonstrating WSP Builder."
Version="1"
Group="WSPBuilder Content Types">
<FieldRefs />
</ContentType>
</Elements>

 

We are now ready to build the WSP file. clicks tools-> wspbuilder-> build WSP. you shoshould see some text in the output window and when all is done, we shoshould have a WSP file in the root folder of our project. fire up a command prompt and head over to that directory. to add the WSP file to the solution store, issue the following command:Stsadm-O addsolution-filename wspbuilderdemo. WSP. You shoshould See "Operation completed successfully." meaning that our WSP file is now in the solution store.

We can see the solution store by going to Central Admin-> operations tab-> solution management. You shocould see the wspbuilderdemo. WSP file has now been put into your farm's solution store:

Go ahead and click on wspbuilderdemo. WSP and deploy the feature out globally. Once deployment is finished, you can activate the feature via site collection features:

Then verify its existence in the site content types section of a site within the site collection:

So those are the basics to using wspbuilder. as you can see, within a few minutes, we were able to build a WSP file, add it to the solution store, and deploy it globally to our SharePoint farm. keep your eyes out for more on wspbuilder soon!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.