哈,当然,我刚发布了这个,我就想出了怎么做。我正在维护解决方案文件夹的字典,这就是我所做的......
ICollection<KeyValuePair<String, SolutionFolder>> _solutionFolders = new Dictionary<String, SolutionFolder>();
_solutionFolders.Add(new KeyValuePair<string, SolutionFolder>("Api", (SolutionFolder)solution.AddSolutionFolder("Api").Object));
_solutionFolders.Add(new KeyValuePair<string, SolutionFolder>("Api.Commands", (SolutionFolder)_solutionFolders.Single(d => d.Key.Equals("Api")).Value.AddSolutionFolder("Commands").Object));
_solutionFolders.Add(new KeyValuePair<string, SolutionFolder>("Api.Queries", (SolutionFolder)_solutionFolders.Single(d => d.Key.Equals("Api")).Value.AddSolutionFolder("Queries").Object));