Skip to content

Remove explicit SourceLink package and EmbedUntrackedSources for SDK 8+ #34

@dmytroett

Description

@dmytroett

Background

The Source Link README now states that for .NET SDK 8+ projects hosted on GitHub, Source Link support is included by default and no explicit Source Link package reference or build-property opt-in is required.

Reference:

Current state

src/AttributedDI/AttributedDI.csproj currently has:

  • <PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
  • <EmbedUntrackedSources>true</EmbedUntrackedSources>

The project targets only SDK-era TFMs:

  • net8.0;net9.0;net10.0

Proposal

  • Remove Microsoft.SourceLink.GitHub package reference from src/AttributedDI/AttributedDI.csproj.
  • Remove explicit <EmbedUntrackedSources>true</EmbedUntrackedSources> from src/AttributedDI/AttributedDI.csproj.
  • Keep <PublishRepositoryUrl>true</PublishRepositoryUrl> (still useful for NuGet package metadata).

Why

  • Reduces explicit configuration that duplicates SDK defaults.
  • Avoids pinning/overriding Source Link package version when SDK already provides it.

Acceptance criteria

  • Build/pack still produces symbols and Source Link metadata as expected.
  • No regression in package debugging experience for consumers.
  • src/AttributedDI/AttributedDI.csproj no longer contains the explicit Source Link package reference or EmbedUntrackedSources property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions