XploRe.SourceLink.OpenSource 1.0.1

Prefix Reserved
This package has a SemVer 2.0.0 package version: 1.0.1+301908d.
dotnet add package XploRe.SourceLink.OpenSource --version 1.0.1                
NuGet\Install-Package XploRe.SourceLink.OpenSource -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XploRe.SourceLink.OpenSource" Version="1.0.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XploRe.SourceLink.OpenSource --version 1.0.1                
#r "nuget: XploRe.SourceLink.OpenSource, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XploRe.SourceLink.OpenSource as a Cake Addin
#addin nuget:?package=XploRe.SourceLink.OpenSource&version=1.0.1

// Install XploRe.SourceLink.OpenSource as a Cake Tool
#tool nuget:?package=XploRe.SourceLink.OpenSource&version=1.0.1                

Development meta-package that provides a simple way to set up Source Link and reproducible builds for open source projects.

Usage

To configure Source Link and reproducible builds, add the following package reference to the project file:

<Project Sdk="Microsoft.NET.Sdk">
  <ItemGroup>
    <PackageReference Include="XploRe.SourceLink.OpenSource" Version="1.0.0" PrivateAssets="All" />
  </ItemGroup>
</Project>

Setting PrivateAssets to All ensures that the package reference is used for building only and will not appear as a dependency in the .nuspec file of the project. If a tool is used to add the dependency, the PrivateAssets property should be set automatically.

Configure additional Source Link properties as needed (e.g. when a private host is used).

Effects

Referencing the package will automatically add development dependencies for all available Source Link implementations; a matching one for the currently used VCS is chosen automatically.

Additionally, several build properties are set, including:

  • DebugType is set to portable. This is recommended for packages that are published on nuget.org and configures the generation of portable PDBs for distribution via symbol packages. See documentation on how to create a symbol package.
  • Deterministic is set to true. This ensures that the build is reproducible.
  • ContinuousIntegrationBuild is set to true if the build is triggered by a CI system such that source paths are normalised for matching sources in the remote repository.
  • PublishRepositoryUrl is set to true. This automatically adds the repository url to the generated .nuspec file.
  • EmbedUntrackedSources is set to true. Untracked sources are source files that are not part of the repository but were generated during the build (e.g. AssemblyInfo.cs).

Each property is only set if not already set. To overwrite the value, set the property in the project file.

Documentation

For the full documentation please visit the repository at:
https://gitlab.com/xplo-re/dotnet/sourcelink.opensource

License

Released under the Apache License, Version 2.0.

Copyright © xplo.re IT Services, Michael Maier.
All rights reserved.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 151 4/14/2022