When publishing a ClickOnce application, I would like all PDB files to be included (for logging purposes).
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.
I've tried adding the following (and some variations) to the project file:
<ItemGroup>
<PublishFile Include="**\*.pdb">
<Visible>False</Visible>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>File</FileType>
</PublishFile>
</ItemGroup>
But Visual Studio overwrites this when saving the project file later on, adding each PDB file individually, which defeats the purpose.
According to MSDN, .pdb files are excluded by default. Can this default be changed?
Does anyone have a solution?