dave clements
dave clements

Reputation: 1505

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

Upvotes: 29

Views: 11880

Answers (4)

gautejohan
gautejohan

Reputation: 428

I had to manually add <DebugType>pdbonly</DebugType> in the *.csproj file to the PropertyGroup with matching condition to the build configuration I was debugging with.

Upvotes: 1

Faiyaz
Faiyaz

Reputation: 1411

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

Upvotes: 14

dave clements
dave clements

Reputation: 1505

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!

Upvotes: 30

iCediCe
iCediCe

Reputation: 1722

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.

Upvotes: 11

Related Questions