Skip to content

How replacements work

Sayed Ibrahim Hashimi edited this page Dec 9, 2013 · 1 revision

SideWaffle / TemplateBuilder Replacement Support

If you are building project templates (works for item template too, but less likely to be needed) you can preform file replacements on a per-folder basis.

All you have to do is create a file with the name _preprocess.xml in the folder that you want replacements to occur. Inside that file you can declare the following:

  1. What files should be included in the replacements
  2. What files should be excluded in the replacements
  3. One more more replacements

Below you'll see the format of the _preprocess.xml file

Format of _preprocess.xml file

<?xml version="1.0" encoding="utf-8" ?>
<Preprocess>
  <Replacements Include="*.*" Exclude="*.vstemplate;*.csproj*.jpg;*.png;*.ico;templateinfo.xml">   
    <add key="My.Cool.Company.SharedLibrary" value="$safeprojectname$Shared"/>
  </Replacements>
</Preprocess>