PDB not generated for .net standard project

hoenigorama's Avatar

hoenigorama

15 Nov, 2017 05:21 PM

I'm setting up a new app and I wanted to use .netstandard class library and I'm having an issue with it creating the PDB file when building. I see it adds a .pssym file, but no PDB. When I removed the postsharp reference the PDB is created. I also setup a .net Framework 4.7 class library and I added a reference to postsharp to test it. It created the pssym file and the PDB as you would expect. So, I'm seeing this issue with building a .netstandard 2 library only.

Visual Studio 2017 version: 15.4.4
Postsharp version: 5.0.37

Is this a bug, or am I missing something?

  1. Support Staff 1 Posted by PostSharp Techn... on 21 Nov, 2017 03:17 PM

    PostSharp Technologies's Avatar

    Hello,

    build of portable library projects produces so called Portable PDB and PostSharp doesn't support Portable PDB yet.

    If you develops only on Windows you can change pdb format to full:

    1) In Visual Studio Open project properties by right-clicking on your project in solution explorer.
    2) Select Build tab.
    3) Click Advanced... button.
    4) Select full from Debugging information dropdown.
    5) Click OK.

    Or you can define DebugType property inside specific Configuration/Platform property group in your csproj files.

    Example csproj file can look like this then:

    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
        <DebugType>full</DebugType>
        <DebugSymbols>true</DebugSymbols>
      </PropertyGroup>
      <ItemGroup>
        <PackageReference Include="PostSharp" Version="5.0.38" />
      </ItemGroup>
    </Project>
    

    Best regards,
    -jakub

  2. Support Staff 2 Posted by PostSharp Techn... on 13 Dec, 2017 03:02 PM

    PostSharp Technologies's Avatar

    Hello,

    We are going to close this request as there have not been any further updates. Please feel free to reopen the discussion if you need more help.

    Thanks,
    PostSharp Team

  3. PostSharp Technologies closed this discussion on 13 Dec, 2017 03:02 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac