commands to build and deploy wsp solution

Oct 3, 2008 at 7:54 PM
What are the commands to to build and deploy wsp solution?

I'm using WSPBuilder -SolutionPath C:\MyProject -Outputpath C:\MySolution to build my solution .

But it's generating blank solution .If i use wspbuilder ext from vs it's building perfectly.

Oct 14, 2008 at 9:20 PM
The demos in the WSPBuilder source show how to set this up perfectly, so if you're looking for a tutorial, that's the best way to learn. You can also look under your bin/Debug/ folder and see what the Visual Studio addin ("WSPBuilder Extensions") does for you; that may help explain it some.

I will say as a quick answer: if you're trying to include your DLL in your Solution package, do one of the following:
  • If you want your DLL deployed to the GAC, make a /GAC folder and place the DLL there.
  • If instead you need to deploy to the web app's BIN folder, make a /BIN folder and place the DLL there.
Oct 20, 2008 at 8:37 PM
Thanks for your response.

Can you provide the link for demos?i tried but haven't found.

I didn't find any folder inside bin/Debug from my project.

I can successfully able to build/deploy with vs extensions. But failing to create equivalent commands for those.

I need these to automate my deployment process.

I have feature receiver class but without bin folder i can able to build and deploy it to gac using vs extensions.

Nov 9, 2008 at 8:56 PM

Here's what I do.  I right click on the project in VS.  Choose WSP Builder and then Create Deployment Folder (I think that's what it's called from memory).  That will generate a subfolder of bin which contains a whole bunch of deployment files including 3 batch files for deployment.  One of them is called deploywithstsadm.bat.  I copy that one up to the top level (the same level as the project file) and add it to the project so that it also gets added in to source control (if you are using that).  Then I edit the stsadm commands in there to do the deployment as I wish (e.g. add a target url rather than -allcontenturls, activate the feature via stsadm if you want to).  

You could also do the same thing with the batch file that uses wspbuilder to do the deployment (that file is also created for you) but I personally prefer to use stsadm because it's the standard admin tool and I guess any issues with it will be fixed by SharePoint upgrades and service packs.  

Either way you have a single custom batch file in your project that you just run from the command line and it will deploy the solution for you.  For dev purposes I still use GACUTIL to register the DLL in the GAC and recyle the app pool - for the development cycle that is faster than re-deploying the solution every time.   But it's always worth re-building and re-deploying the WSP solution properly every so often (just to make sure that you still can).