简体   繁体   English

在Visual Studio 2015中没有生成pdb

[英]No pdb generated in Visual Studio 2015

I've got a solution that works fine when I open it in VS2013 (Ultimate), but when I open it in VS2015 (Enterprise), two of the projects don't generate debug information. 当我在VS2013(Ultimate)中打开它时,我有一个解决方案可以正常工作,但是当我在VS2015(Enterprise)中打开它时,其中两个项目不会生成调试信息。

One project is an MVC 5 app and the other is a class library. 一个项目是MVC 5应用程序,另一个是类库。 All projects in the solution are set to .net 4.5 and all are set to debug mode 解决方案中的所有项目都设置为.net 4.5,并且所有项目都设置为调试模式

The advanced settings for both projects are set to full and appear to compile without issue, yet when I open the Debug > Windows > Modules window while the site is running, these two binaries have "Binary was not built with debug information" in their Symbol Status (every other binary in the solution loads symbols correctly) 两个项目的高级设置都设置为完整并且看起来没有问题编译,但是当我在网站运行时打开Debug> Windows> Modules窗口时,这两个二进制文件的符号中包含“Binary not built with debug information”状态(解决方案中的每个其他二进制文件正确加载符号

I've deleted the bin/obj folders, cleared temporary asp.net files, restarted both VS and windows(10) and no luck 我删除了bin / obj文件夹,清除了临时的asp.net文件,重新启动了VS和windows(10)并且没有运气

This is affecting other team members, so it doesn't appear to be an issue with my environment 这会影响其他团队成员,因此它似乎不是我的环境的问题

Also, if I compile in VS2013, VS2015 will use the pdb's without problem, it just won't generate them for itself 另外,如果我在VS2013中编译,VS2015将毫无问题地使用pdb,它只是不会为自己生成它们

I'm assuming this is a setting/feature/bug somewhere in VS2015, but i'm not sure what else I can check/change to get this sorted out 我假设这是VS2015中某处的设置/功能/错误,但我不知道还有什么我可以检查/更改以解决这个问题

EDIT: The web project has it's web.config set to debug="true" and it isn't being affected by config transforms 编辑:Web项目的web.config设置为debug =“true”,它不受配置转换的影响

It turns out that this was a problem with PostSharp 事实证明这是PostSharp的一个问题

The projects both referenced version 3.1.52 - after upgrading to 4.1.21 we now have pdb's being generated again 这些项目都引用了3.1.52版本 - 升级到4.1.21后,我们现在再次生成pdb

I'm not quite sure what the issue is or why it's manifested this way, but hopefully this might stop someone else banging their head against the wall like i've been! 我不太确定问题是什么或为什么会以这种方式表现出来,但希望这可能会阻止别人像我一样撞到墙上!

Same problem occurs if old version of Telerik open data access is used in the project. 如果在项目中使用旧版本的Telerik开放数据访问 ,则会出现同样的问题。 Project generates pdp file when build through VS2013 but doesn't do the same when build using VS2015. 在通过VS2013构建时,Project生成pdp文件,但在使用VS2015构建时不会执行相同的操作。

It was painfull and time taking to find out the reason that it requires latest version Q2 (which doesn't have Visual designer - version Q1 2015 of Telerik Data Access is the last one that distributes Visual Studio integration and code generation features) 找出它需要最新版本Q2(没有可视化设计器 - 2015年第1版Telerik数据访问版本是最后一个分发Visual Studio集成和代码生成功能的版本)是痛苦和耗费时间的。

Anyway read the Telerik support blog http://www.telerik.com/forums/visual-studio-2015-ctp6-does-not-generate-pdb-file 无论如何阅读Telerik支持博客http://www.telerik.com/forums/visual-studio-2015-ctp6-does-not-generate-pdb-file

Actually debug has nothing to do with if pdb's are generate or not. 实际上,调试与pdb是否生成无关。 Lot of people generates pdb's for production releases and keep them in a local symbol store. 很多人为生产版本生成pdb,并将它们保存在本地符号存储中。 Anyways try to go to the build tab under the project and then Advanced and set debug info to pdb-only or full. 无论如何,尝试转到项目下的构建选项卡,然后选择Advanced,并将调试信息设置为pdb-only或full。

我不得不手动将* .csproj文件中的<DebugType>pdbonly</DebugType>添加到PropertyGroup,其条件与我正在调试的构建配置相匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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