5

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?

2
  • add <PublishState>Include</PublishState> below the visible tag May 16, 2014 at 18:37
  • While this does seem to work initially, Visual Studio doesn't appear to like the use of wildcards, as it adds all PDB files individually on saving the project later on. Which is what I'm trying to avoid...
    – Stijn
    May 19, 2014 at 8:03

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.