pdb file is mising after PostSharp
Asked Answered
M

3

9

I am using PostSharp version 2.1.6.4 (also tried latest version 2.1.7.35) and sometimes pdb file is missing and there is a pssym file in it's place.

<?xml version="1.0" encoding="utf-8"?>
<Symbols xmlns="http://schemas.postsharp.org/2.0/symbols">
  <Class Class="#1=T:[CrosscuttingLogging]CrosscuttingLogging.Attributes.LogMethodCallStatsAttribute" LimitedLicense="true" />
  <Class Class="#2=T:[RequestLimiter]RequestLimiter.RequestCounterAttribute" LimitedLicense="true" />
</Symbols>

I ran procmon on the build process and as far as I can tell the postsharp.srv.4.0-x86.exe process moves both dll and pdb files from obj\Debug folder to obj\Debug\Before-PostSharp folder and later on generates a new dll in obj\Debug folder, but a new pdb file is not generated.

This happens for some of my dlls (seemingly at random) and does not seem to be reliable, because on other machine all pdb files are generated correctly.

Margarite answered 25/6, 2015 at 18:25 Comment(0)
O
17

PostSharp 2.1.x doesn't support Visual Studio 2015 (.NET4.6/Roslyn).

The PDB format has changed a little bit in .NET 4.6. I would expect that there is an exception in PostSharp during PDB post-processing which is the reason why the PDB is not copied to the output folder. If you are using VS2015, then this kind of issues could happen.

The solution is either not to use .NET4.6/Roslyn with PostSharp 2.x or to upgrade to at least PostSharp 3.1.

Osteoclasis answered 29/6, 2015 at 9:22 Comment(7)
Still had this issue with PostSharp 3.1; upgraded to the latest release (which is 4.1.x) which fixed the issue. In my case, it´s a .NET 4.5 solution which I migrated to Visual Studio 2015... I am not using .NET 4.6 yet.Trypanosomiasis
i have postsharp 4.2 and still getting this. Unknown custom metadata item kind: 6.Pushcart
Which 4.2 version do you use? Are both PostSharp nuget package and PostSharp Tools for Visual Studio on 4.2 version?Osteoclasis
We have the same problem with VS2015 update 3, .NET 4.5.2 and Postsharp 2.1. (VS2015 Update 1 works)Munroe
It's not a problem of 4.6. The issue takes place for any target framework in all VS starting 2015. So if your project had PostSharp 2.x then you (as me) have to stick to VS2013 forever. This is terrible. And this is why I won't use PostSharp again ever.Suite
This case is explained at support.sharpcrafters.com/discussions/problems/….Shipway
The issue is even occurring in PostSharp v5.0.44 on Visual Studio 2017 (v15.7.3)Tyler
R
6

I had this same issue and I upgraded from PostSharp 3.1.46 to 3.1.67 and it did resolve my case. I do get the .pdb file created and I am able to debug again.

Reddin answered 30/7, 2015 at 1:20 Comment(0)
C
1

Same problem, same workaround. Upgraded from 3.1.51 to 3.1.69 and pdb generated again.

Cydnus answered 11/9, 2015 at 2:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.