简体   繁体   中英

Change name of generated PDB file to include .exe or .dll extension of its executable

In Visual Studio 2010, is it possible to change the naming of the .pdb file to include the full name of the executable, including its extension, and that debugging will still work?

For example, suppose I have an executable myprogram.exe , I want the pdb to be myprogram.exe.pdb rather than myprogram.pdb . Similarly, I want mylibrary.dll to have mylibrary.dll.pdb rather than mylibrary.pdb .

.pdb name is specified in c:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\Microsoft.CSharp.targets file.

<_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).pdb" Condition="'$(_DebugSymbolsProduced)'=='true' and '@(_DebugSymbolsIntermediatePath)'==''"/>

You can edit it to override .pdb file names globally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM