Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel authored Jun 28, 2024
2 parents 4884455 + 9803dac commit 7ed41dc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# DotNet.ReproducibleBuilds

This repo generates a package that enables reproducible builds in a single step, and documents MSBuild settings useful for enabling reproducibility through isolation.
[![.NET Foundation](https://img.shields.io/badge/.NET%20Foundation-blueviolet.svg)](https://www.dotnetfoundation.org/)
[![Build Status](https://dev.azure.com/dotnet/Projects/_apis/build/status%2FReproducibleBuilds%20-%20CI?branchName=main)](https://dev.azure.com/dotnet/Projects/_build/latest?definitionId=154&branchName=main)

This repo documents various MSBuild settings for reproducibilty, and providing two nuget packages for enabling some of these setting.

The packages are:

- DotNet.ReproducibleBuilds
- DotNet.ReproducibleBuilds.Isolated
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](https://img.shields.io/nuget/v/DotNet.ReproducibleBuilds?style=flat&label=DotNet.ReproducibleBuilds)](https://www.nuget.org/packages/DotNet.ReproducibleBuilds)
[![NuGet Downloads](https://img.shields.io/nuget/dt/DotNet.ReproducibleBuilds?style=flat)](https://www.nuget.org/packages/DotNet.ReproducibleBuilds)

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/

Expand All @@ -32,7 +33,7 @@ Add the following to your `Directory.Build.props` file so all projects in your s

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

Expand All @@ -44,6 +45,9 @@ Prerelease packages are available on the following [NuGet feed](https://dev.azur

## DotNet.ReproducibleBuilds.Isolated Documentation and nuget package

[![NuGet Version](https://img.shields.io/nuget/v/DotNet.ReproducibleBuilds.Isolated?style=flat&label=DotNet.ReproducibleBuilds.Isolated)](https://www.nuget.org/packages/DotNet.ReproducibleBuilds.Isolated)
[![NuGet Downloads](https://img.shields.io/nuget/dt/DotNet.ReproducibleBuilds.Isolated?style=flat)](https://www.nuget.org/packages/DotNet.ReproducibleBuilds.Isolated)

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

Expand All @@ -58,7 +62,7 @@ If you check out the same commit with the same SDK version and same nuget feed,
Add the following to the top of your projects or to `Directory.Build.props`:

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

Tested on MSBuild 16.7 (Latest LTS at time of writing).
Expand Down
5 changes: 3 additions & 2 deletions src/DotNet.ReproducibleBuilds.Isolated/Sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
-->

<!--
Restrict the reference assembly search path.
Restrict the reference assembly search path to avoid machine-specific dependencies. See
https://github.com/dotnet/msbuild/blob/3deec2fe6b7cdc7c3f2458d23d5451893872c031/documentation/wiki/ResolveAssemblyReference.md?plain=1#L148
-->
<PropertyGroup>
<AssemblySearchPaths>
Expand Down Expand Up @@ -49,4 +50,4 @@
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<DisableImplicitLibraryPacksFolder>true</DisableImplicitLibraryPacksFolder>
</PropertyGroup>
</Project>
</Project>

0 comments on commit 7ed41dc

Please sign in to comment.