SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer


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.