Is there anyway I can build .wsp file using MSBuild target?
I am able to pass
msbuild.exe but can I pass it
MSBuild target too?
Do I need to use
MAKECAB.exe? I hope not..
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
Visual Studio creates the WSP at build since it includes this in the CSPROJ file:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets" />
That does a lot of work to validate the project and such before creating a WSP file.
If you simply build the project with msbuild, the WSP should be output to the release or debug directory (depending on your build target). If you need to do something with it after it builds, you can reference that location. In addition, you could always add a post-build event that does something with the file if you need it to.