How to always produce byte-for-byte identical .exe on rebuild of C# application?

后端 未结 6 767
孤独总比滥情好
孤独总比滥情好 2021-02-05 07:47

I\'ll give you a little bit of background first as to why I\'m asking this question:

I am currently working in a stricly-regulated industry and as such our code is quite

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 08:44

    Regarding the PDB GUID problem, if you specify that a PDB shouldn't be generated at compilation for Release builds, does the binary still contain the PDB's file system GUID?

    To disable PDB generation:

    1. Right-click your project in Solution Explorer and select Properties.
    2. From the menu along the left, select Build.
    3. Ensure that the Configuration selection is Release (you'll still want a PDB for debugging).
    4. Click the Advanced button in the bottom right.
    5. Under Output / Debug Info, select None.

    If you're building from the console, use /debug- to get the same result.

提交回复
热议问题