title: Tips and tricks for working with Microsoft Visual Studio solutions and project
body: <p>After answering on <a href="https://stackoverflow.com/questions/45650/common-files-in-visual-studio-solution#45664">this question</a> I thought it would be nice to collect some tips &amp; tricks for working with MSVS solutions and projects.  </p>
  
  <p>Here is my list:  </p>
  
  <ul>
  <li><p>How to avoid saving new projects
  automatically to reduce garbage in
  file system.</p>
  
  <p>Uncheck <strong>Tools->Options->Projects and Solutions->Save new projects when created</strong></p></li>
  <li><p>How to add common file to multiple
  projects without copying it to
  project’s directory.</p>
  
  <p>Right click on a project, select <strong>Add->Existing Item->Add as link</strong> (press on small arrow on Add button)</p></li>
  <li><p>How to add project to solution
  without including it in the build
  process</p>
  
  <p>Right click on solution, select <strong>Add->New solution folder</strong>.<br>
  Right click on created folder, <strong>select Add->Add existing project</strong></p></li>
  <li><p>How to edit project file from Visual
  Studio?</p>
  
  <p>Right click on project and select <strong>Unload Project</strong>, right click on unloaded project and select <strong>Edit</strong>.
  Or install <a href="http://code.msdn.microsoft.com/PowerCommands" rel="nofollow noreferrer">Power Commands</a> and select <strong>Edit Project File</strong></p></li>
  <li><p>How to group files in the project
  tree (like auto-generated files for
  WinForms controls)</p>
  
  <p>Open project file for editing.  </p></li>
  </ul>
  
  <pre>   Change</pre>
  
  <pre><code>&lt;Compile Include="MainFile.cs" /&gt;
  &lt;Compile Include="SecondaryFile.cs" /&gt;
  
  To
  
  &lt;Compile Include="SecondaryFile.cs "&gt;
      &lt;DependentUpon&gt; MainFile.cs &lt;/DependentUpon&gt;
  &lt;/Compile&gt;
  </code></pre>
  
  <p>Do you have anything else to add?</p>