Building wsp from post-build event command line
What is the command fo开发者_运维知识库r building WSP from post-build event command line?
I'm adding one more image so that you can understand my exact requirement.
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.
You will have to depend on external tools like makecab.exe or WSPBuilder.
http://www.developerfusion.com/community/blog-entry/8390127/tfs-teambuild-and-sharepoint-wsp-deployment-and-any-post-build-events-for-that-matter/
http://www.fftf.org/news/Jul07feed/SharePoint_Solution_Deployment_Handy_PostBuild_Events.rss.html
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)
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>
精彩评论