Is it possible to add a solution folders with the project template? If it\'s not built in functionality, is it possible to create a custom task for this?
You can do it using template wizards. I guess that you already know how to implement it.
So, inside RunFinished method, write these lines:
var destFolder = Directory.GetParent(path).Parent;
System.IO.Directory.CreateDirectory(destFolder.FullName + "\\.nuget");
((Solution2) _dte.Solution).AddSolutionFolder(destFolder.FullName + "\\.nuget");
For Solution2 class you have to reference EnvDTE80.dll. _dte must be set from RunStarted method.
private DTE _dte;
public void RunStarted(object automationObject, Dictionary replacementsDictionary, WizardRunKind runKind, object[] customParams)
{
_dte = (DTE)automationObject;
}