Skip to content

Should I Use This Package? #18

@RehanSaeed

Description

@RehanSaeed

I've followed this post a year or more ago to add source link like so:

  <PropertyGroup Label="Build">
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
  </PropertyGroup>

  <PropertyGroup Label="Source Link">
    <!-- Optional: Declare that the Repository URL can be published to NuSpec -->
    <PublishRepositoryUrl>true</PublishRepositoryUrl>
    <!-- Optional: Embed source files that are not tracked by the source control manager to the PDB -->
    <EmbedUntrackedSources>true</EmbedUntrackedSources>
    <!-- Optional: Include PDB in the built .nupkg -->
    <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
  </PropertyGroup>

  <ItemGroup Label="Package References">
    <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.1" />
  </ItemGroup>

I also use Cake build to set the ContinuousIntegrationBuild variable based on !BuildSystem.IsLocalBuild.

I'm trying to understand if I should switch over to DotNet.ReproducibleBuilds. There seem to be two differences:

  1. The package sets DebugType to embedded which I believe would stop generating a snupkg file. I don't currently set DebugType, so the default must be coming from SymbolPackageFormat above. Why was embedded chosen as the default?
  2. Do the source link packages also set AllowedOutputExtensionsInPackageBuildOutputFolder? dotnet pack pdb files by default ctaggart/SourceLink#291 makes it pretty unclear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions