Reputation: 2060
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?
Upvotes: 5
Views: 3636
Reputation: 3271
I realize this is not exactly a current question, but it doesn't have any answers and I had/have the same question and found the answer here: http://blog.deltacode.be/2012/09/26/include-pdb-files-in-web-application-publish-for-release-mode-vs2012/
In the Project Properties and the Package/Publish Web section there is a checkbox titled: Exclude generated debug symbols. Clear the tick and the PDB files will appear in the Publish folder.
Upvotes: 1