title: How to automatically include PDB files when publishing?
body: <p>When publishing a ClickOnce application, I would like all <b>PDB</b> files to be included (for logging purposes).<br/>
  I can do this manually by checking them in the Application Files dialog box, but then I would have to remember doing this every time a new reference is added to the project. So it would be much easier if this were to happen automatically.</p>
  
  <p>I've tried adding the following (and some variations) to the project file:</p>
  
  <pre><code>&lt;ItemGroup&gt;
      &lt;PublishFile Include="**\*.pdb"&gt;
          &lt;Visible&gt;False&lt;/Visible&gt;
          &lt;Group&gt;
          &lt;/Group&gt;
          &lt;TargetPath&gt;
          &lt;/TargetPath&gt;
          &lt;PublishState&gt;Include&lt;/PublishState&gt;
          &lt;IncludeHash&gt;True&lt;/IncludeHash&gt;
          &lt;FileType&gt;File&lt;/FileType&gt;
      &lt;/PublishFile&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>But Visual Studio overwrites this when saving the project file later on, adding each PDB file individually, which defeats the purpose.</p>
  
  <p>According to MSDN, <a href="http://msdn.microsoft.com/en-us/library/xtkkwf3d%28v=vs.100%29.aspx" rel="nofollow">.pdb files are excluded by default</a>. Can this default be changed?</p>
  
  <p>Does anyone have a solution?</p>