/// <summary>
        /// Adds the project to template.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <param name="vsTemplate">The vs template.</param>
        /// <param name="contextNode">The context node.</param>
        private void AddAssetsToTemplate(Project project, VSSolutionTemplate vsTemplate, XmlNode contextNode)
        {
            if (project.Object is SolutionFolder)
            {
                //Add SolutionFolder node
                SolutionFolder solutionFolder     = project.Object as SolutionFolder;
                XmlNode        solutionFolderNode = vsTemplate.CreateSolutionFolderNode(solutionFolder.Parent.Name);
                contextNode.AppendChild(solutionFolderNode);

                foreach (ProjectItem item in project.ProjectItems)
                {
                    if (item.Object != null &&
                        (item.Object is Project ||
                         ((Project)item.Object).Object is SolutionFolder))
                    {
                        AddAssetsToTemplate((Project)item.Object, vsTemplate, solutionFolderNode);
                    }
                }
            }
            else
            {
                string projectName;

                if (project.Object is VSWebSite)
                {
                    projectName = VSTemplateExporterHelper.GetProjectName(project.UniqueName);
                }
                else
                {
                    projectName = project.Name;
                }

                string relativeTemplatePath = Path.Combine
                                              (
                    Path.Combine(this.ProjectsDirectory, projectName),
                    string.Concat(projectName, VSTemplateExporterHelper.TEMPLATE_EXTENSION)
                                              );

                XmlNode projectTemplateLinkNode = vsTemplate.CreateProjectTemplateLinkNode(projectName, relativeTemplatePath);

                contextNode.AppendChild(projectTemplateLinkNode);

                //Create project template
                VSProjectTemplateExporter webProjectExporter = new VSProjectTemplateExporter(
                    project,
                    this.projectsTemplateIconFile,
                    outputProjectsDirectory);

                webProjectExporter.Export();
            }
        }