Developing and Deploying a SharePoint Feature - Part 1
page 5 of 8
by Steven Barden
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 30611/ 74

Configuring the install code

Next we want to add the components used to deploy the feature. This is fairly simple considering you simply perform various copy processes. If you open and review the Install.cmd file, you will see it probably looks very much like many other post-build deploy processes you have probably configured in the course of ASP.NET development. In fact, if you are beginning to think that SharePoint is decidedly ASP.NET-development-like, you would be correct. Although SharePoint is a decidedly advanced development platform, after you get past various new oddities of learning, you will find that any previous ASP.NET development work you have done will probably be used more than you may have guessed.

The first part of the Install.cmd file sets various obvious parameters. Next comes some gacutil and xcopy commands where you will see that your previous work in setting up a file structure is quite helpful. Only toward the end of this command file does it begin to deviate from any other ASP.NET project by running the STSADM tool to perform the SharePoint install process.

Note, if you want to run this command file each time you compile, simply place the following two lines, on separate lines, in the Post-build event command line box in the solution settings: “cd $(ProjectDir)” and “install.cmd.” On the other hand, if you compile a lot you may not want this running each time, in which case simply opening the command prompt and typing “cd /d C:\Code\SharePoint\Features\DeployHelloWorld” followed by running the command file will do the trick.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 3 and 3 and type the answer here:

User Comments

Title: Developing and Deploying a SharePoint Feature - Part 1   
Name: Swati Agarwal
Date: 6/28/2010 3:49:36 AM
Comment:
Please make your explanations simple man!!! It is like reading a psycology book :(
Title: Create Custom SharePoint Features, it is simple.   
Name: sara
Date: 10/1/2009 2:01:37 AM
Comment:
Nice !!!!!!!!
Try this too,

http://sarangasl.blogspot.com/2009/09/in-this-article-im-going-to-describe.html
Title: Configuring install code   
Name: Sohaib Khan
Date: 2/19/2009 1:45:46 AM
Comment:
Basically, I am doing this first time so i am not familiar with the syntax of PostBuildEvent.
Thanks in advance - Steven.
Title: Configuring install code   
Name: Sohaib Khan
Date: 2/19/2009 1:44:36 AM
Comment:
and this one as well
Call ($ProjectDir)\Import.cmd
Title: Configuring install code   
Name: Sohaib Khan
Date: 2/19/2009 1:41:42 AM
Comment:
I also tried this command
($ProjectDir)\Import.cmd
Title: Configuring the install code   
Name: Sohaib Khan
Date: 2/19/2009 1:39:30 AM
Comment:
I am trying this command
set CONFIGURATION=$(Configuration) && ($ProjectDir)\Import.cmd
Title: Configuring the Install Code   
Name: Sohaib Khan
Date: 2/19/2009 1:36:56 AM
Comment:
Hi Steve,

I've 2 files which are abc.wsp (Solution Package of SharePoint) and Import.cmd(stsadm commands). Now, for distribution, i am using VS Setup Project. In Setup Project, i want to execute cmd file automatically so i am using PostBuildEvent.
Title: Configuring the install code   
Name: Steven Barden
Date: 2/18/2009 9:15:08 PM
Comment:
Sohaib,

You will have to provide me with allot more details than that. Pretend I'm sending the same request for help to you, and reconsider how you would like things described.
Title: Configuring the install code   
Name: Sohaib Khan
Date: 2/18/2009 9:38:07 AM
Comment:
Hi,

I've included *.cmd file and *.wsp file in my setup project. Now, I want to run cmd file after completion of installation automatically. So, i am using PostEventBuilder. I also tried your command but i am getting error. Any hint please ......

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2012 ASPAlliance.com  |  Page Processed at 2/12/2012 4:16:46 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search