Question

What is the command for building WSP from post-build event command line?

enter image description here

I'm adding one more image so that you can understand my exact requirement.

enter image description here

Was it helpful?

Solution 3

I found the answer from here and it works for both SharePoint 2007 and 2010.

call "C:\Program Files\WSPTools\WSPBuilderExtensions\WSPBuilder.exe" -ProjectPath $(SolutionDir) -OutputPath $(SolutionDir) -SolutionPath $(SolutionDir)

OTHER TIPS

You can build a WSP by using MSBuild. Each SharePoint project is build with the parameter

IsPackaging=True

By adding this parameter to the msbuild command you can ensure that all WSPs will be created.

This seems to be VS2010.
If you choose the project template to be a SharePoint 2010 project then you will find items in the context menu that are related to SharePoint. If you choose deploy, it will create the wsp package automatically and deploy it to the server.

To force Visual Studio to create a wsp on post build for SharePoint solutions, add these properties to the project xml. If you already have a post build event defined, just add the two inner tags to the existing property group. Visual Studio will create the wsp in the configured location; Release or Debug.

To edit the project xml unload the project in visual studio then right-click on the project and select edit.

<PropertyGroup>
      <IsDebugging>False</IsDebugging>
 <PostBuildEventDependsOn>$(PostBuildEventDependsOn);CreatePackage</PostBuildEventDependsOn>
</PropertyGroup>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top