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.
答案 0 :(得分:17)
PostSharp 2.1.x不支持Visual Studio 2015(.NET4.6 / Roslyn)。
PDB格式在.NET 4.6中有所改变。我期望在PDB后期处理期间PostSharp中存在异常,这是PDB未被复制到输出文件夹的原因。如果您使用的是VS2015,那么可能会出现这种问题。
解决方案是要么不使用带有PostSharp 2.x的.NET4.6 / Roslyn,要么至少升级到PostSharp 3.1。
答案 1 :(得分:6)
我有同样的问题,我从PostSharp 3.1.46升级到3.1.67,它确实解决了我的情况。我确实创建了.pdb文件,我可以再次调试。
答案 2 :(得分:1)
同样的问题,同样的解决方法。从3.1.51升级到3.1.69并再次生成pdb。