How to pack an additional symbols.nupkg with new csproj VS2017

Just edit your new csproj and inside the PropertyGroup tags add Tags for IncludeSource and IncludeSymbols like below. Pack in VS2017 will then make an additional symbols.nupkg.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    ...
    <IncludeSource>True</IncludeSource>
    <IncludeSymbols>True</IncludeSymbols>
  </PropertyGroup>
</Project>

To see the whole list of tags available for Nuget package building in the new csproj you can refer to the docs


The accepted answer is valid because it's dated in Mar,2017.

Symbol packages is becoming legacy. symbols.nupkg is still supported but only for compatibility reasons.

The new recommended format for symbol packages is .snupkg Add the following lines in csproj file in vs 2017 :

   <PropertyGroup>
     <IncludeSymbols>true</IncludeSymbols>
     <SymbolPackageFormat>snupkg</SymbolPackageFormat>
   </PropertyGroup>

for more details review: https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg