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.
The easiest way to use the PDB file is to let Visual Studio do the heavy lifting - either launch your program with Visual Studio's "Debug" command (F5 by default), or run the program and use the "Attach to Process" item in Visual Studio's Debug menu.
No, you don't have to deploy the . pdb file. To quote from MSDN, "A PDB file is created when you build with /debug (Visual Basic/C#).", so it shouldn't be creating the debug database when compiling for release.
Program database (PDB) is a file format (developed by Microsoft) for storing debugging information about a program (or, commonly, program modules such as a DLL or EXE). PDB files commonly have a . pdb extension. A PDB file is typically created from source files during compilation.
pdb file stores all debug information for the project's .exe file, and resides in the \debug subdirectory. The <project>. pdb file contains full debug information, including function prototypes, not just the type information found in VC<x>. pdb.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With