What is the difference between using Full and Portable for .net core projects?

The difference is that the “full” type emits a classic windows PDB symbol file which is complex and poorly documented. The “portable” PDB format is a new open-source format that can be created and used on all platforms. You can read more information on this format at it’s documentation on the dotnet/core repo.

It has nothing to do with whether or not the application can be debugged, but rather the tools that support the new vs classic format. So there aren’t any runtime consequences (except for printing stack traces in .NET Framework < 4.7.1 when you ship portable pdb files with the application and want to see line number mapping).

So until tools are updated to work with the new format, you’ll need to change the DebugType property to Full if you need to use tooling which does not yet support the new format which is now the default for “SDK-based” projects.

To only do that for debug builds, you’ll want your csproj to contain a section like

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
  <DebugType>Full</DebugType>
</PropertyGroup>

Leave a Comment