/// <summary>
        /// Attach the generated files if the process is successful.
        /// </summary>
        public void AttachGeneratedFiles()
        {
            if (this.Errors.IsNullOrEmpty())
            {
                foreach (var file in _generatedFiles)
                {
                    FileHelper.TryMove(file.TempPath, file.Path);                     // -> override files
                }

                VisualStudioHelper.AddToProject(
                    _generatedFiles.Where(i => i.AddToProject).Select(f => f.Path),
                    (file) =>
                {
                    if (this.OnGeneratedFile != null)
                    {
                        this.OnGeneratedFile(this, new TextTemplatingEngineFileGeneratedEventArgs(file, true));
                    }
                });
            }
        }