I wrote a Visual Studio Wizard Template using c# on visual studio 2012.
I followed the MSDN steps: I created a VS template, then I created a Class Library project wi
You can accomplish this using SolutionFolder interface:
Project project = getSolutionSubFolder(solution, "SubFolderName");
if (project != null)
{
SolutionFolder folder = (SolutionFolder)project.Object;
folder.AddFromFile("yourProjectFilePath");
}
Where getSolutionSubFolder
method looks like this:
private static Project getSolutionSubFolder(Solution2 solution, string subfolder)
{
return
solution
.Projects
.Cast<Project>()
.FirstOrDefault(
p => string.Equals(p.Name, subfolder, StringComparison.Ordinal));
}