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.