简体   繁体   中英

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.

One project is an MVC 5 app and the other is a class library. All projects in the solution are set to .net 4.5 and all are set to debug mode

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)

I've deleted the bin/obj folders, cleared temporary asp.net files, restarted both VS and windows(10) and no luck

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

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

EDIT: The web project has it's web.config set to debug="true" and it isn't being affected by config transforms

It turns out that this was a problem with PostSharp

The projects both referenced version 3.1.52 - after upgrading to 4.1.21 we now have pdb's being generated again

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. Project generates pdp file when build through VS2013 but doesn't do the same when build using 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)

Anyway read the Telerik support blog 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. Lot of people generates pdb's for production releases and keep them in a local symbol store. Anyways try to go to the build tab under the project and then Advanced and set debug info to pdb-only or full.

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

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