public override void AddFileFromTemplate(string source, string target)
{
if (!File.Exists(source))
throw new FileNotFoundException(
String.Format("Template file not found: {0}", source));
// We assume that there is no token inside the file because the only
// way to add a new element should be through the template wizard that
// take care of expanding and replacing the tokens.
// The only task to perform is to copy the source file in the
// target location.
string targetFolder = Path.GetDirectoryName(target);
if (!Directory.Exists(targetFolder))
{
Directory.CreateDirectory(targetFolder);
}
File.Copy(source, target);
}