Visual Studio 2013 not recreating pdb files

天大地大妈咪最大 提交于 2019-12-20 01:38:57

问题


I have a weird problem with PDB files in a VS 2013 C# project. Basically what is happening is that the PDB files are not getting rebuilt when the project is getting rebuilt. This is causing the project to always think it needs to get rebuilt. I've tried cleaning the solution, but if anything changes in the project it gets put back into the same state again.

I created a simple class library project and the behavior was the same. As a sanity check, I created the same class library on another PC and it worked as I would have expected.

Does anybody have any ideas as to what might be causing this strange behavior?


回答1:


Please check “Advanced Build Settings Dialog Box”

Is “Debug Info” set none?

see MSDN




回答2:


I had this problem. I went into Build > Configuration Manager. Make sure that the active solution configuration is Debug. Next change the platform to be Any CPU. Somehow many projects were getting built on a mixed platform which was only allowing a couple project's pdb files to get built.




回答3:


I have exactly the same problem. The only solution I've managed to come up with is to add a pre-build step to each project to delete the .pdb:

del "$(ProjectDir)obj\$(Configuration)\$(TargetName).pdb"

Which then seems to force it to create a new file when it's built.



来源:https://stackoverflow.com/questions/27307651/visual-studio-2013-not-recreating-pdb-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!