title: How do I manually add Solution folders to a .sln file?
body: <p>Say I have a solution that is structured like so:</p>
  
  <pre><code>|__TopLevelFolder
       |___ModuleFolder
           |____ProjectFile
           |____TestProjectFile
  </code></pre>
  
  <p>I want to create another "ModuleFolder" under "TopLevel" and add its corresponding project and test project files. However, for my purposes I have to manually modify the .sln file to add them (I am doing this as part of a yeoman generator meaning I can't do this in VS like normal).</p>
  
  <p>My problem is that when I modify the .sln file, my folder appears as an unavailable project, and when I try to reload it, the load fails and it says "The project file or web cannot be found." Here is what I'm doing in the .sln file:</p>
  
  <p>First I add the folder:</p>
  
  <pre><code>Project("{GUID}") = "NewModuleFolder", "NewModuleFolder", "{NewModuleGUID}"
  EndProject
  </code></pre>
  
  <p>Then I add the actual project:</p>
  
  <pre><code>Project("{GUID}") = "TopLevel.NewModule.Tests", "src\TopLevel\NewModule\TopLevel.NewModule.Tests.csproj", "{TestProjectGUID}"
  EndProject
  </code></pre>
  
  <p>Then in the "preSolution" section I add a line which places the NewModuleFolder underneath the TopLevelFolder as well as the TestProject underneath the NewModuleFolder:</p>
  
  <pre><code>GlobalSection(NestedProjects) = preSolution
      {NewModuleGUID} = {TopLevelGUID}
      {TestProjectGUID} = {NewModuleGUID}
      ...
  EndGlobalSection
  </code></pre>
  
  <p>This is exactly how all the other folders and projects work in my solution (believe me I double and triple-checked as well as tried switching GUIDs around to make sure).</p>
  
  <p>Any ideas on how to make this work or what I'm doing wrong (or a different way I should be doing this considering I'm creating a yeoman generator)?</p>
  
  <p>Thanks!!</p>