зеркало из
1
0
Форкнуть 0
Contains the DotNet.ReproducibleBuilds package
Перейти к файлу
Aaron Lahman 569a1fe828 Merge branch 'main' into feature/msbuild-repeatability 2021-05-11 17:23:43 -07:00
Documentation minor edits 2021-05-11 17:17:06 -07:00
config Add files for build/sign 2021-04-28 15:35:00 -04:00
src/DotNet.ReproducibleBuilds Merge branch 'main' into teamcity 2021-05-11 12:22:23 -05:00
.editorconfig Add files for build/sign 2021-04-28 15:35:00 -04:00
.gitattributes Initial commit 2021-04-28 14:50:57 -04:00
.gitignore use a nuspec 2021-04-29 17:41:15 -04:00
CHECKLIST.md Initial commit 2021-04-28 14:50:57 -04:00
CODE-OF-CONDUCT.md Initial commit 2021-04-28 14:50:57 -04:00
CONTRIBUTING.md Initial commit 2021-04-28 14:50:57 -04:00
DotNet.ReproducibleBuilds.sln Add files for build/sign 2021-04-28 15:35:00 -04:00
LICENSE Initial commit 2021-04-28 14:50:57 -04:00
README.md Merge branch 'main' into feature/msbuild-repeatability 2021-05-11 17:23:43 -07:00
azure-pipelines.yml specify path 2021-04-29 17:46:46 -04:00
version.json Add files for build/sign 2021-04-28 15:35:00 -04:00

README.md

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.

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

Build Isolation Documentation

See Reproducible-MSBuild/Techniques/toc.md for a list of techniques to improve isolation of your builds from the host machine's configuration.

It's highly recommended that most projects enable these settings as described in the above documentation and usage section.

DotNet.ReproducibleBuilds nuget package

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
  • EmbedUntrackedSources = true
  • DebugType = embedded. You can specify portable in your project if you prefer, but you'll need to upload that .snupkg file too.
  • IncludePackageReferencesDuringMarkupCompilation = true (enables a fix for WPF)
  • ContinuousIntegrationBuild = true on CI systems

It also adds SourceLink dependencies for all repo types (the right one will be used automatically).

For more information on 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="0.1.34" 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

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: