I need to modify the content of some files in my SP 2010 project before packaging, something like Web.Config transformations.

I need a file to have different content based on the environment: Debug, Staging, Release.

What are my options aside pre-build event command line in the build events?


I eventually used MSBuild to intervene before the WSP packaging step (step 3 from here).

What you will need is the AfterLayout step. An explanation on Integrating post-processors in SharePoint builds you can find here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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