DotNet.ReproducibleBuilds 1.2.25

Prefix Reserved
dotnet add package DotNet.ReproducibleBuilds --version 1.2.25                
NuGet\Install-Package DotNet.ReproducibleBuilds -Version 1.2.25                
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="DotNet.ReproducibleBuilds" Version="1.2.25">
  <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 DotNet.ReproducibleBuilds --version 1.2.25                
#r "nuget: DotNet.ReproducibleBuilds, 1.2.25"                
#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 DotNet.ReproducibleBuilds as a Cake Addin
#addin nuget:?package=DotNet.ReproducibleBuilds&version=1.2.25

// Install DotNet.ReproducibleBuilds as a Cake Tool
#tool nuget:?package=DotNet.ReproducibleBuilds&version=1.2.25                

DotNet.ReproducibleBuilds

.NET Foundation Build Status

This repo is a collection of best practices for build reproducibility with MSBuild.

It provides documentation and NuGet packages to simplify build configuration and isolate builds from developer or workstation-specific settings.

DotNet.ReproducibleBuilds nuget package

NuGet Version NuGet Downloads

It's highly recommended that all projects enable these settings, either via adding this package or manually as described here: https://devblogs.microsoft.com/dotnet/producing-packages-with-source-link/

This package sets the following properties:

  • PublishRepositoryUrl = true
  • DebugType = embedded. You can specify portable in your project if you prefer, but you'll need to upload that .snupkg file too.
  • ContinuousIntegrationBuild = true on CI systems

More information on PublishRepositoryUrl and debugging with Source Link is here.

Usage

Add the following to your Directory.Build.props file so all projects in your solution have the package added -- use the latest package version.

<ItemGroup>
  <PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.4" PrivateAssets="All"/>
</ItemGroup>

MSBuild 16.10 is required to generate binaries that can be fully reproduced. You'll need Visual Studio 2019 16.10 and/or .NET 5.0.300 SDK. You'll get a warning if you're using a lower version.

Prerelease packages are available on the following NuGet feed: https://pkgs.dev.azure.com/dotnet/Projects/_packaging/ReproducibleBuilds/nuget/v3/index.json

DotNet.ReproducibleBuilds.Isolated Documentation and nuget package

NuGet Version NuGet Downloads

It's highly recommended that all projects enable these settings, either via adding this package or manually, as described in Documentation/Reproducible-MSBuild.

This package configures a variety of properties and item groups to prevent your build from unintentionally depending on other installed software that's not described by your repo. All build dependencies should come from either the MSBuild SDK you've chosen, or from nuget packages restored from your package feed.

If you check out the same commit with the same SDK version and same nuget feed, you should get the same build result.

Usage

Add the following to the top of your projects or to Directory.Build.props:

<Sdk Name="DotNet.ReproducibleBuilds.Isolated" Version="1.2.4" />

Tested on MSBuild 16.7 (Latest LTS at time of writing).

Contributing

See CONTRIBUTING.md for information on contributing to this project.

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

License

This project is licensed with the MIT license.

.NET Foundation

DotNet.ReproducibleBuilds is a .NET Foundation project.

You should take a look at these related projects:

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DotNet.ReproducibleBuilds:

Package Downloads
AspireDashboardHelper

A helper library for adding the Aspire Dashboard docker image to your projects.

GitHub repositories (65)

Showing the top 5 popular GitHub repositories that depend on DotNet.ReproducibleBuilds:

Repository Stars
dotnet/Silk.NET
The high-speed OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, WebGPU, and DirectX bindings library your mother warned you about.
morelinq/MoreLINQ
Extensions to LINQ to Objects
elastic/elasticsearch-net
This strongly-typed, client library enables working with Elasticsearch. It is the official client maintained and supported by Elastic.
Dotnet-Boxed/Templates
.NET project templates with batteries included, providing the minimum amount of code required to get you going faster.
oxyplot/oxyplot
A cross-platform plotting library for .NET
Version Downloads Last updated
1.2.25 170,954 9/10/2024
1.2.4 150,335 6/27/2024
1.1.1 1,753,194 11/11/2021
0.1.66 69,104 7/27/2021
0.1.64 3,406 5/22/2021
0.1.34 897 5/11/2021
0.1.26 5,041 4/30/2021

# Changelog

## [1.2.0]

### Added

- [Support for transitive package references](https://github.com/dotnet/reproducible-builds/pull/16) - thanks @meziantou!
- [Add RepositoryBranch package metadata when available in the build environment](https://github.com/dotnet/reproducible-builds/pull/27) - thanks @kzu!

### Removed

- [Remove the automatically provided .NET Framework reference assembly PackageReference, since the SDK provides this already](https://github.com/dotnet/reproducible-builds/pull/33) - thanks @MattKotsenas!