569a1fe828 | ||
---|---|---|
Documentation | ||
config | ||
src/DotNet.ReproducibleBuilds | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
CHECKLIST.md | ||
CODE-OF-CONDUCT.md | ||
CONTRIBUTING.md | ||
DotNet.ReproducibleBuilds.sln | ||
LICENSE | ||
README.md | ||
azure-pipelines.yml | ||
version.json |
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 specifyportable
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.
Related Projects
You should take a look at these related projects: