https://github.com/dotnet/reproducible-builds
Contains the DotNet.ReproducibleBuilds package
https://github.com/dotnet/reproducible-builds
Last synced: about 1 month ago
JSON representation
Contains the DotNet.ReproducibleBuilds package
- Host: GitHub
- URL: https://github.com/dotnet/reproducible-builds
- Owner: dotnet
- License: mit
- Created: 2021-04-28T18:50:54.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-02T15:17:52.000Z (5 months ago)
- Last Synced: 2025-04-13T00:48:04.127Z (about 1 month ago)
- Language: C#
- Homepage:
- Size: 137 KB
- Stars: 201
- Watchers: 17
- Forks: 18
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE-OF-CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# DotNet.ReproducibleBuilds
[](https://www.dotnetfoundation.org/)
[](https://dev.azure.com/dotnet/Projects/_build/latest?definitionId=154&branchName=main)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
[](https://www.nuget.org/packages/DotNet.ReproducibleBuilds)
[](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/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 systemsMore information on `PublishRepositoryUrl` and debugging with Source Link is [here](https://devblogs.microsoft.com/dotnet/improving-debug-time-productivity-with-source-link/).
### 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.
```xml
```
MSBuild 17.8 is required to generate binaries that can be fully reproduced. You'll need Visual Studio 2022 17.8 and/or .NET 8.0.100 SDK. You'll get a warning
if you're using a lower version.Prerelease packages are available on the following [NuGet feed](https://dev.azure.com/dotnet/Projects/_packaging?_a=feed&feed=ReproducibleBuilds):
`https://pkgs.dev.azure.com/dotnet/Projects/_packaging/ReproducibleBuilds/nuget/v3/index.json`## DotNet.ReproducibleBuilds.Isolated Documentation and nuget package
[](https://www.nuget.org/packages/DotNet.ReproducibleBuilds.Isolated)
[](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).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`:
```xml
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for information on contributing to this project.
This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/)
to clarify expected behavior in our community. For more information, see the [.NET Foundation Code of Conduct](http://www.dotnetfoundation.org/code-of-conduct).## License
This project is licensed with the [MIT license](LICENSE).
## .NET Foundation
DotNet.ReproducibleBuilds is a [.NET Foundation project](https://dotnetfoundation.org/projects).