Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is there anyway I can build .wsp file using MSBuild target?

I am able to pass t:/Package to msbuild.exe but can I pass it MSBuild target too?

Do I need to use MAKECAB.exe? I hope not..

share|improve this question
2  
What is it that you are attempting to do that is not handled by the built-in WSP tools? –  Dave Wise Mar 1 '13 at 19:45
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.