How to reference a wspbuilder.exe.config file in WSPBuilder command line

May 5, 2010 at 8:00 PM
Hello - I'm new to both SharePoint/WSPBuilder and TeamCity/Nant (which is what we are using for CI, etc.). I have figured out how to get a TeamCity Build configuration to use NAnt to successfully build a SharePoint solution and create the .wsp package. However, I have a lot of questions. For now: 1 - Is it possible to reference a "wspbuilder.exe.config" file in this configuration? I think this would be similar to consuming a wspbuilder.exe.config file while using WSPBuilder via command line. I haven't been able to figure this part out. For now I'm duplicating any wspbuilder.exe.config settings in the .bat file called by the NAnt build configuration. 2 - One thing we use via the VS IDE is the WSPBuilder option for "Create Deployment Folder". Is there an equivalent command that can be used for the command line in a .bat file? Any other way to do this? 3 - There seem to be a lot of WSPBuilder parameters, etc. that are not listed in the "WSPBuilder Manual.txt" file (e.g. "-BuildSolution", etc.). Is there a more comprehensive source for all the options? 4 - Also, I noticed that when you run WSPBuilder from the VS IDE it will automatically compile all projects in a solution (we have about 10 in one of ours) and then properly package the wsp file. However, via the command line (and hence any .bat file also), you have to ensure the solution is built first (using MSBuild) prior to calling the WSPBuilder for the wsp package. Is there a way to combine this via the command line/.bat? Below is the .bat parameters I use to Build the solution first, the call WSPBuilder: <target name="compile"> <exec program="${msbuild.root.dir}\MSBuild.exe"> <arg line='"${solution.root.dir}\AMC.ListDefinitions.sln"' /> <arg value="/target:Rebuild" /> <arg value="/verbosity:normal" /> </exec> <exec program="${wspbuilder.root.dir}\WSPBuilder.exe" workingdir="${solution.root.dir}"> <arg value="-SolutionPath" /> <arg value="${solution.root.dir}" /> <arg value="-Outputpath" /> <arg value="${solution.root.dir}" /> <arg value="-ProjectPath" /> <arg value="${project.root.dir}" /> <arg value="-BuildSolution" /> <arg value="true" /> </exec> </target> Thanks.
Sep 29, 2011 at 5:36 AM

In my case my requirement was very similar to your requirement. Please checkout the post here. And thanks for Sharing the idea.