How to turn off pdb generation and vshost for all Release builds

前端 未结 3 1823
挽巷
挽巷 2020-12-15 03:31

Every time I start a new piece of software I have to go into the configuration and turn off pdb file generation and the Visual Studio hosting process for Release builds. Is

3条回答
  •  一向
    一向 (楼主)
    2020-12-15 04:32

    Why not add a post build step that deletes these files you don't want. Hmm, that still another step, not what you wanted :-(

    What about writing a little helper app that does a FindFirstFile and FindNextFile loop looking for PDB and shost files in your release directories. When it finds them, it deletes them. Or better still moves them to an archive location - this allows to remove them from the release packaging issues but still keep the files in case you need them for bug analysis.

    Plus because its a helper app you can just run it once as part of your pre-handoff to release staff.

    We use this technique for lots of things:

    • Ensuring DLLs are up to date (basically an intelligent update for the whole build tree)
    • Cleaning VC builds better than "batch build" can (removing some of those files that can crash Visual Studio)
    • Archiving certain in a particular fashion (similar to what I've suggested for you)
    • etc

    I'm with Brian - you should keep these files. If you need to debug any bug or failure, you will need these files.

提交回复
热议问题