How To Create wsp for Deployment in Sharepoint:-
First why MS used wsp in Sharepoint :- Development for Microsoft Windows SharePoint Services 3.0 often involves deploying custom source files into the WSS \TEMPLATE directory. It is helpful to create a Microsoft Visual Studio project with a directory structure that parallels the \TEMPLATE directory so you can automate copying your source files into the location required for deployment and testing.
- 1. It is versionable
- 2. Draft feature we can use.
- 3. When a new Window Front end server will add in your sharepoint environment wsp automatically will be deployed on it. Actually it creates the timer jobs which will be executed.
How to create the Custome wsp Solution in Visula Studio
- Go to Visual Studio New Project
- Choose New Project of ClassLibrary Type and Specify the Name KrishanaDemoWsp. Save as your desired location.
- Next, create a \TEMPLATE directory inside the project.
- Right Click on your solution and add folder Give name 12
- within 12 folder create another folder and give name Templates
- Within Template folder create new folder and give name Features as per snap shot.
,Create a LAYOUTS directory within Template. Within the LAYOUTS directory, create either a company-specific or project-specific directory and create your custom application pages inside it. In our example I am taking a custom page and created a MyCompanyName folder in LAYOUTS directory.
Figure 1. Your Visual Studio project with a directory structure parallel to the WSS\TEMPLATE directory
create a batch file to automate copying these files into the 12 \TEMPLATE directory. If you are testing a Feature, the batch file must also make calls to the STSADM.EXE command-line utility to install (and possibly activate the feature as well). If your solution contains an assembly that must be installed in the global assembly cache (GAC), your batch must also run a command with the utility named GACUTIL.EXE. Here is an example of a batch file that involves all these aspects of deployment for testing purposes.
- If you have custom page, Custom Style sheet, java script or Image Files and want to deploy on SharePoint
- Create a LAYOUTS directory within Template. Within the LAYOUTS directory, create either a company-specific or project-specific directory and create your custom application pages inside it. In our examplee I am taking a custom page and created a MyCompanyName folder in LAYOUTS directory.
- Deployment Process: after you create the source file for component such as features and custom application page.
- Right click on your solution and add new itesm
- Give name Install.bat and press OK
- Write the following Command in your Batch File