1. When queuing a build, the following MSBuild arguments can be specified to package the project:
/p:IsPackaging=True
I found the first here:http://msdn.microsoft.com/en-us/ff622991.aspx
2. To save doing this everytime a build is made, the following modification can be made the the project file:
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets" />
<PropertyGroup>
<BuildDependsOn>$(BuildDependsOn);CreatePackage</BuildDependsOn>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
If found the second here:
http://www.sharemuch.com/2010/03/23/how-to-package-on-build-in-your-visual-studio-sharepoint-2010-solution/
good article on wsp package it will help you a lot in deployment.
ReplyDeleteYou can just add this to the build definition.
ReplyDelete- Right mouse click on the build defintion
- Edit
- Select Process
- Expand Advanced
- In MSBuild Arguemnts, add /p:IsPackaging=True
- Save
All subsequent builds will automatically generate the WSP.
I supposed you could do this in the Build Template as well.