open-feature / dotnet-sdk

.NET implementation of the OpenFeature SDK
https://openfeature.dev
Apache License 2.0
62 stars 17 forks source link

chore: SourceLink is built-in for .NET SDK 8.0.100+ #198

Closed austindrenski closed 7 months ago

austindrenski commented 7 months ago

Using Source Link in .NET projects

Starting with .NET 8, Source Link for the following source control providers is included in the .NET SDK and enabled by default:

If your project uses .NET SDK 8+ and is hosted by the above providers it does not need to reference any Source Link packages or set any build properties.

Otherwise, you can enable Source Link experience in your project by setting a few properties and adding a PackageReference to a Source Link package specific to the provider:

<Project>
 <PropertyGroup>
    <!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
    <PublishRepositoryUrl>true</PublishRepositoryUrl>

    <!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
    <EmbedUntrackedSources>true</EmbedUntrackedSources>
  </PropertyGroup>
  <ItemGroup>
    <!-- Add PackageReference specific for your source control provider (see below) --> 
  </ItemGroup>
</Project>

See: open-feature/dotnet-sdk-contrib#143

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c0fbbcd) 93.50% compared to head (2a237c7) 93.50%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #198 +/- ## ======================================= Coverage 93.50% 93.50% ======================================= Files 23 23 Lines 954 954 Branches 105 105 ======================================= Hits 892 892 Misses 38 38 Partials 24 24 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.